Fix for [#31978] "Horizon colour drawn on two edges of screen when a 2D filter is...
authorMitchell Stokes <mogurijin@gmail.com>
Thu, 5 Jul 2012 21:03:29 +0000 (21:03 +0000)
committerMitchell Stokes <mogurijin@gmail.com>
Thu, 5 Jul 2012 21:03:29 +0000 (21:03 +0000)
The glViewport used for 2D Filters wasn't quite matching the 3d view. It seems the height and width were both off by one. There may be a deeper bug with the canvas rectangle having slightly wrong dimensions, but this at least fixes the 2D Filters.

source/gameengine/Rasterizer/RAS_2DFilterManager.cpp

index 43acb9e5f8a4ddaaffd96845a65d9171cd32b839..cf6ea6534020366980a1edaadb37af539aa663b2 100644 (file)
@@ -431,7 +431,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(), texturewidth, textureheight);
+       glViewport(rect.GetLeft(), rect.GetBottom(), rect.GetWidth()+1, rect.GetHeight()+1);
 
        glDisable(GL_DEPTH_TEST);
        // in case the previous material was wire