From 7e69cd862e773fbf5a76989c58ddb722b81da114 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 28 Jul 2018 19:01:04 +0200 Subject: [PATCH] - restore the viewport after the SSAO pass. This runs through the generic postprocessing code which restores the screen's viewport but since this is run in the middle of the scene it needs to restore the scene's viewport (i.e. the window controlled by screenblocks.) --- src/gl/scene/gl_scene.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gl/scene/gl_scene.cpp b/src/gl/scene/gl_scene.cpp index 2420f1aea2d..fa7b9f7a739 100644 --- a/src/gl/scene/gl_scene.cpp +++ b/src/gl/scene/gl_scene.cpp @@ -333,6 +333,7 @@ void FDrawInfo::DrawScene(int drawmode) { gl_RenderState.EnableDrawBuffers(1); GLRenderer->AmbientOccludeScene(VPUniforms.mProjectionMatrix.get()[5]); + glViewport(screen->mSceneViewport.left, screen->mSceneViewport.top, screen->mSceneViewport.width, screen->mSceneViewport.height); GLRenderer->mBuffers->BindSceneFB(true); gl_RenderState.EnableDrawBuffers(gl_RenderState.GetPassDrawBufferCount()); gl_RenderState.Apply();