From 4a80f8e4ed0bfff6e56bfef8bc1f302599253958 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 3 Sep 2016 16:54:17 +0200 Subject: [PATCH] - fixed: Camera textures and savegame pictures should not be drawn with a Stereo3D mode. --- src/gl/scene/gl_scene.cpp | 4 ++-- src/gl/stereo3d/gl_stereo3d.h | 1 + src/gl/stereo3d/gl_stereo_cvars.cpp | 7 +++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/gl/scene/gl_scene.cpp b/src/gl/scene/gl_scene.cpp index 82b63aa006..b4dd95d507 100644 --- a/src/gl/scene/gl_scene.cpp +++ b/src/gl/scene/gl_scene.cpp @@ -822,7 +822,7 @@ sector_t * FGLRenderer::RenderViewpoint (AActor * camera, GL_IRECT * bounds, flo // Render (potentially) multiple views for stereo 3d float viewShift[3]; - const s3d::Stereo3DMode& stereo3dMode = s3d::Stereo3DMode::getCurrentMode(); + const s3d::Stereo3DMode& stereo3dMode = mainview && toscreen? s3d::Stereo3DMode::getCurrentMode() : s3d::Stereo3DMode::getMonoMode(); stereo3dMode.SetUp(); for (int eye_ix = 0; eye_ix < stereo3dMode.eye_count(); ++eye_ix) { @@ -1313,7 +1313,7 @@ void FGLInterface::RenderTextureView (FCanvasTexture *tex, AActor *Viewpoint, in gl_fixedcolormap=CM_DEFAULT; gl_RenderState.SetFixedColormap(CM_DEFAULT); - bool usefb = gl_usefb || gltex->GetWidth() > screen->GetWidth() || gltex->GetHeight() > screen->GetHeight(); + bool usefb = !gl.legacyMode || gl_usefb || gltex->GetWidth() > screen->GetWidth() || gltex->GetHeight() > screen->GetHeight(); if (!usefb) { glFlush(); diff --git a/src/gl/stereo3d/gl_stereo3d.h b/src/gl/stereo3d/gl_stereo3d.h index 303f188252..c56cc078fc 100644 --- a/src/gl/stereo3d/gl_stereo3d.h +++ b/src/gl/stereo3d/gl_stereo3d.h @@ -74,6 +74,7 @@ class Stereo3DMode public: /* static methods for managing the selected stereoscopic view state */ static const Stereo3DMode& getCurrentMode(); + static const Stereo3DMode& getMonoMode(); Stereo3DMode(); virtual ~Stereo3DMode(); diff --git a/src/gl/stereo3d/gl_stereo_cvars.cpp b/src/gl/stereo3d/gl_stereo_cvars.cpp index e7d08df411..897b280887 100644 --- a/src/gl/stereo3d/gl_stereo_cvars.cpp +++ b/src/gl/stereo3d/gl_stereo_cvars.cpp @@ -105,5 +105,12 @@ const Stereo3DMode& Stereo3DMode::getCurrentMode() return *currentStereo3DMode; } +const Stereo3DMode& Stereo3DMode::getMonoMode() +{ + setCurrentMode(MonoView::getInstance()); + return *currentStereo3DMode; +} + + } /* namespace s3d */