diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2010-10-12 00:55:05 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2010-10-12 00:55:05 +0400 |
commit | 3a369128b43a9d19846151de8a37e8a07ca2f423 (patch) | |
tree | c8ab65ff0c3ddfabed080f7653a875e74b342802 /source/gameengine/Rasterizer | |
parent | b0b7354d5ce3d57fac9ff5b263b860cb249b9b44 (diff) |
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.
Diffstat (limited to 'source/gameengine/Rasterizer')
-rw-r--r-- | source/gameengine/Rasterizer/RAS_2DFilterManager.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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); |