diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2012-12-24 06:59:16 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2012-12-24 06:59:16 +0400 |
commit | 119665d5b7b61f1924b4f0bf89fe1cff00017eed (patch) | |
tree | fec95260eeb16ce1c8ff2ac45adb2155be64c777 /source/gameengine/Rasterizer | |
parent | 388c08c88b7f7ec27dcde3f44761adba8926bde8 (diff) |
BGE: Use canvas->SetViewPort() instead of glViewport() in the 2D filter.
Diffstat (limited to 'source/gameengine/Rasterizer')
-rw-r--r-- | source/gameengine/Rasterizer/RAS_2DFilterManager.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp index cf869e71945..152c6bcce4e 100644 --- a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp +++ b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp @@ -428,8 +428,7 @@ void RAS_2DFilterManager::RenderFilters(RAS_ICanvas* canvas) // reverting to texunit 0, without this we get bug [#28462] glActiveTextureARB(GL_TEXTURE0); - - glViewport(rect.GetLeft(), rect.GetBottom(), rect_width, rect_height); + canvas->SetViewPort(rect.GetLeft(), rect.GetBottom(), rect_width, rect_height); glDisable(GL_DEPTH_TEST); // in case the previous material was wire @@ -466,7 +465,7 @@ void RAS_2DFilterManager::RenderFilters(RAS_ICanvas* canvas) } glEnable(GL_DEPTH_TEST); - glViewport(viewport[0],viewport[1],viewport[2],viewport[3]); + canvas->SetViewPort(viewport[0],viewport[1],viewport[2],viewport[3]); EndShaderProgram(); glPopMatrix(); glMatrixMode(GL_MODELVIEW); |