fix [#28462] Tiled textures and 2D filters don't mix
authorCampbell Barton <ideasman42@gmail.com>
Sat, 3 Sep 2011 04:44:18 +0000 (04:44 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 3 Sep 2011 04:44:18 +0000 (04:44 +0000)
patch by Juha Mäki-Kanto

source/gameengine/Rasterizer/RAS_2DFilterManager.cpp

index d9a9fbb0d312c70e2be76f1b7e255849810aa948..725d00aa5cdc8a6a47762e6e90e192585662a7ef 100644 (file)
@@ -433,6 +433,9 @@ void RAS_2DFilterManager::RenderFilters(RAS_ICanvas* canvas)
                glCopyTexImage2D(GL_TEXTURE_2D,0,GL_LUMINANCE16, 0, 0, texturewidth,textureheight, 0);
        }
 
+       // reverting to texunit 0, without this we get bug [#28462]
+       glActiveTextureARB(GL_TEXTURE0);
+
        glViewport(0,0, texturewidth, textureheight);
 
        glDisable(GL_DEPTH_TEST);