From 3a369128b43a9d19846151de8a37e8a07ca2f423 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Mon, 11 Oct 2010 20:55:05 +0000 Subject: BGE Bugfix for [#22371] Alpha Planes affecting 2DFilters disabling GL_Blend at the 2dfilter drawing routine makes the trick here. there is not a clear function invoked before the 2dfilter drawing routine. Therefore I found better to disable alpha blending while we are setting the other OpenGl attributes/matrixes. We are not re-enabling GL_BLEND after we disable it. We could and it wouldn't hurt but I can't see why to. open to suggestions here of course. --- source/gameengine/Rasterizer/RAS_2DFilterManager.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/gameengine') diff --git a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp index 4527850a8e9..0c16d6a29c2 100644 --- a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp +++ b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp @@ -431,6 +431,8 @@ void RAS_2DFilterManager::RenderFilters(RAS_ICanvas* canvas) glViewport(0,0, texturewidth, textureheight); glDisable(GL_DEPTH_TEST); + // if the last rendered face had alpha add it would messes with the color of the plane we apply 2DFilter to + glDisable(GL_BLEND); glPushMatrix(); //GL_MODELVIEW glLoadIdentity(); // GL_MODELVIEW glMatrixMode(GL_TEXTURE); -- cgit v1.2.3