mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 13:23:52 +00:00
Menu transition video now visible.
Videos no longer upside down. Scene no longer visible during loading screens.
This commit is contained in:
parent
44a039796a
commit
c0772807d2
2 changed files with 11 additions and 7 deletions
|
@ -597,10 +597,9 @@ namespace MWGui
|
||||||
|
|
||||||
unsigned int disablemask = MWRender::Mask_GUI|MWRender::Mask_PreCompile;
|
unsigned int disablemask = MWRender::Mask_GUI|MWRender::Mask_PreCompile;
|
||||||
|
|
||||||
// In VR mode we have a scene to render.
|
// VR mode needs to render the 3D gui
|
||||||
// TODO: We should nonetheless disable the scene outside of the 3D GUI
|
|
||||||
if (MWBase::Environment::get().getVrMode())
|
if (MWBase::Environment::get().getVrMode())
|
||||||
return;
|
disablemask = MWRender::Mask_3DGUI | MWRender::Mask_PreCompile | MWRender::Mask_RenderToTexture;
|
||||||
|
|
||||||
if (!enable && mViewer->getCamera()->getCullMask() != disablemask)
|
if (!enable && mViewer->getCamera()->getCullMask() != disablemask)
|
||||||
{
|
{
|
||||||
|
|
|
@ -88,6 +88,8 @@ namespace MWVR
|
||||||
setName("GUICamera");
|
setName("GUICamera");
|
||||||
|
|
||||||
setCullMask(MWRender::Mask_GUI);
|
setCullMask(MWRender::Mask_GUI);
|
||||||
|
setCullMaskLeft(MWRender::Mask_GUI);
|
||||||
|
setCullMaskRight(MWRender::Mask_GUI);
|
||||||
setNodeMask(MWRender::Mask_RenderToTexture);
|
setNodeMask(MWRender::Mask_RenderToTexture);
|
||||||
|
|
||||||
setViewport(0, 0, width, height);
|
setViewport(0, 0, width, height);
|
||||||
|
@ -415,7 +417,10 @@ namespace MWVR
|
||||||
float menuBottom = (1.f - mRealRect.bottom) * 2. - 1.;
|
float menuBottom = (1.f - mRealRect.bottom) * 2. - 1.;
|
||||||
float menuTop = (1.f - mRealRect.top) * 2.f - 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
|
void
|
||||||
|
@ -505,17 +510,19 @@ namespace MWVR
|
||||||
{
|
{
|
||||||
mGUIGeometriesRoot->setName("VR GUI Geometry Root");
|
mGUIGeometriesRoot->setName("VR GUI Geometry Root");
|
||||||
mGUIGeometriesRoot->setUpdateCallback(new VRGUIManagerUpdateCallback(this));
|
mGUIGeometriesRoot->setUpdateCallback(new VRGUIManagerUpdateCallback(this));
|
||||||
|
mGUIGeometriesRoot->setNodeMask(MWRender::VisMask::Mask_3DGUI);
|
||||||
mGUICamerasRoot->setName("VR GUI Cameras Root");
|
mGUICamerasRoot->setName("VR GUI Cameras Root");
|
||||||
|
mGUICamerasRoot->setNodeMask(MWRender::VisMask::Mask_3DGUI);
|
||||||
mRootNode->asGroup()->addChild(mGUICamerasRoot);
|
mRootNode->asGroup()->addChild(mGUICamerasRoot);
|
||||||
mRootNode->asGroup()->addChild(mGUIGeometriesRoot);
|
mRootNode->asGroup()->addChild(mGUIGeometriesRoot);
|
||||||
mGUIGeometriesRoot->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
|
mGUIGeometriesRoot->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
|
||||||
|
|
||||||
LayerConfig defaultConfig = createDefaultConfig(1);
|
LayerConfig defaultConfig = createDefaultConfig(1);
|
||||||
LayerConfig videoPlayerConfig = createDefaultConfig(1, true, SizingMode::Fixed);
|
|
||||||
LayerConfig loadingScreenConfig = createDefaultConfig(1, true, SizingMode::Fixed, "Menu");
|
LayerConfig loadingScreenConfig = createDefaultConfig(1, true, SizingMode::Fixed, "Menu");
|
||||||
LayerConfig mainMenuConfig = createDefaultConfig(1, true);
|
LayerConfig mainMenuConfig = createDefaultConfig(1, true);
|
||||||
LayerConfig journalBooksConfig = createDefaultConfig(2, false, SizingMode::Fixed);
|
LayerConfig journalBooksConfig = createDefaultConfig(2, false, SizingMode::Fixed);
|
||||||
LayerConfig defaultWindowsConfig = createDefaultConfig(3, true);
|
LayerConfig defaultWindowsConfig = createDefaultConfig(3, true);
|
||||||
|
LayerConfig videoPlayerConfig = createDefaultConfig(4, true, SizingMode::Fixed);
|
||||||
LayerConfig messageBoxConfig = createDefaultConfig(6, false, SizingMode::Auto);;
|
LayerConfig messageBoxConfig = createDefaultConfig(6, false, SizingMode::Auto);;
|
||||||
LayerConfig notificationConfig = createDefaultConfig(7, false, SizingMode::Fixed);
|
LayerConfig notificationConfig = createDefaultConfig(7, false, SizingMode::Fixed);
|
||||||
|
|
||||||
|
@ -738,10 +745,8 @@ namespace MWVR
|
||||||
auto* layer = widget->mMainWidget->getLayer();
|
auto* layer = widget->mMainWidget->getLayer();
|
||||||
auto name = layer->getName();
|
auto name = layer->getName();
|
||||||
|
|
||||||
Log(Debug::Verbose) << "setVisible (" << name << "): " << visible;
|
|
||||||
if (layerBlacklist.find(name) != layerBlacklist.end())
|
if (layerBlacklist.find(name) != layerBlacklist.end())
|
||||||
{
|
{
|
||||||
Log(Debug::Verbose) << "Blacklisted";
|
|
||||||
// Never pick an invisible layer
|
// Never pick an invisible layer
|
||||||
setPick(widget, false);
|
setPick(widget, false);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue