bge bugfix: [#34517] 2D Filter causes mouselook script drifting effect (patch by...
authorDalai Felinto <dfelinto@gmail.com>
Mon, 4 Mar 2013 08:45:42 +0000 (08:45 +0000)
committerDalai Felinto <dfelinto@gmail.com>
Mon, 4 Mar 2013 08:45:42 +0000 (08:45 +0000)
Fix for 2.66a

""We can't pass the results of canvas->GetViewPort() directly because canvas->SetViewPort() does some extra math""
Bug introduced during 2.65 series in the refactor to use canvas->SetViewPort instead of direct opengl calls for viewport
(53305, 53392, 53393)

source/gameengine/Rasterizer/RAS_2DFilterManager.cpp

index 8a8dc37..e093b7c 100644 (file)
@@ -468,7 +468,8 @@ void RAS_2DFilterManager::RenderFilters(RAS_ICanvas* canvas)
        }
 
        glEnable(GL_DEPTH_TEST);
-       canvas->SetViewPort(viewport[0],viewport[1],viewport[2],viewport[3]);
+       //We can't pass the results of canvas->GetViewPort() directly because canvas->SetViewPort() does some extra math [#34517]
+       canvas->SetViewPort(0, 0, viewport[2]-1, viewport[3]-1);
        EndShaderProgram();
        glPopMatrix();
        glMatrixMode(GL_MODELVIEW);