From cc10fe9bc3a16dde9fbc21f4edb1b80c65e3f7ff Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 4 Jan 2016 00:45:44 +0100 Subject: [PATCH] - fixed: The stereo3D code accessed the global 'viewsector' variable at a place where it no longer contained a correct value. - fixed: The same code did not exclude camera texture views from drawing the 2D overlay. --- src/gl/scene/gl_scene.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gl/scene/gl_scene.cpp b/src/gl/scene/gl_scene.cpp index 518c35934..7a961d2cd 100644 --- a/src/gl/scene/gl_scene.cpp +++ b/src/gl/scene/gl_scene.cpp @@ -810,6 +810,7 @@ sector_t * FGLRenderer::RenderViewpoint (AActor * camera, GL_IRECT * bounds, flo mViewActor=camera; } + // 'viewsector' will not survive the rendering so it cannot be used anymore below. retval = viewsector; // Render (potentially) multiple views for stereo 3d @@ -838,7 +839,7 @@ sector_t * FGLRenderer::RenderViewpoint (AActor * camera, GL_IRECT * bounds, flo clipper.SafeAddClipRangeRealAngles(viewangle + a1, viewangle - a1); ProcessScene(toscreen); - EndDrawScene(viewsector); + if (mainview) EndDrawScene(retval); // do not call this for camera textures. eye->TearDown(); } stereo3dMode.TearDown();