Menu transition video now visible.

Videos no longer upside down.
Scene no longer visible during loading screens.
pull/615/head
madsbuvi 4 years ago
parent 44a039796a
commit c0772807d2

@ -597,10 +597,9 @@ namespace MWGui
unsigned int disablemask = MWRender::Mask_GUI|MWRender::Mask_PreCompile;
// In VR mode we have a scene to render.
// TODO: We should nonetheless disable the scene outside of the 3D GUI
// VR mode needs to render the 3D gui
if (MWBase::Environment::get().getVrMode())
return;
disablemask = MWRender::Mask_3DGUI | MWRender::Mask_PreCompile | MWRender::Mask_RenderToTexture;
if (!enable && mViewer->getCamera()->getCullMask() != disablemask)
{

@ -88,6 +88,8 @@ namespace MWVR
setName("GUICamera");
setCullMask(MWRender::Mask_GUI);
setCullMaskLeft(MWRender::Mask_GUI);
setCullMaskRight(MWRender::Mask_GUI);
setNodeMask(MWRender::Mask_RenderToTexture);
setViewport(0, 0, width, height);
@ -415,7 +417,10 @@ namespace MWVR
float menuBottom = (1.f - mRealRect.bottom) * 2. - 1.;
float menuTop = (1.f - mRealRect.top) * 2.f - 1.;
mMyGUICamera->setProjectionMatrixAsOrtho2D(menuLeft, menuRight, menuBottom, menuTop);
if(mLayerName == "InputBlocker")
mMyGUICamera->setProjectionMatrixAsOrtho2D(menuRight, menuLeft, menuTop, menuBottom);
else
mMyGUICamera->setProjectionMatrixAsOrtho2D(menuLeft, menuRight, menuBottom, menuTop);
}
void
@ -505,17 +510,19 @@ namespace MWVR
{
mGUIGeometriesRoot->setName("VR GUI Geometry Root");
mGUIGeometriesRoot->setUpdateCallback(new VRGUIManagerUpdateCallback(this));
mGUIGeometriesRoot->setNodeMask(MWRender::VisMask::Mask_3DGUI);
mGUICamerasRoot->setName("VR GUI Cameras Root");
mGUICamerasRoot->setNodeMask(MWRender::VisMask::Mask_3DGUI);
mRootNode->asGroup()->addChild(mGUICamerasRoot);
mRootNode->asGroup()->addChild(mGUIGeometriesRoot);
mGUIGeometriesRoot->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
LayerConfig defaultConfig = createDefaultConfig(1);
LayerConfig videoPlayerConfig = createDefaultConfig(1, true, SizingMode::Fixed);
LayerConfig loadingScreenConfig = createDefaultConfig(1, true, SizingMode::Fixed, "Menu");
LayerConfig mainMenuConfig = createDefaultConfig(1, true);
LayerConfig journalBooksConfig = createDefaultConfig(2, false, SizingMode::Fixed);
LayerConfig defaultWindowsConfig = createDefaultConfig(3, true);
LayerConfig videoPlayerConfig = createDefaultConfig(4, true, SizingMode::Fixed);
LayerConfig messageBoxConfig = createDefaultConfig(6, false, SizingMode::Auto);;
LayerConfig notificationConfig = createDefaultConfig(7, false, SizingMode::Fixed);
@ -738,10 +745,8 @@ namespace MWVR
auto* layer = widget->mMainWidget->getLayer();
auto name = layer->getName();
Log(Debug::Verbose) << "setVisible (" << name << "): " << visible;
if (layerBlacklist.find(name) != layerBlacklist.end())
{
Log(Debug::Verbose) << "Blacklisted";
// Never pick an invisible layer
setPick(widget, false);
return;

Loading…
Cancel
Save