[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32420] trunk/blender/source/gameengine/ Rasterizer/RAS_2DFilterManager.cpp: BGE Bugfix for [#22371] Alpha Planes affecting 2DFilters
Dalai Felinto
dfelinto at gmail.com
Mon Oct 11 22:55:05 CEST 2010
Revision: 32420
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32420
Author: dfelinto
Date: 2010-10-11 22:55:05 +0200 (Mon, 11 Oct 2010)
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/blender/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp
Modified: trunk/blender/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp
===================================================================
--- trunk/blender/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp 2010-10-11 20:53:20 UTC (rev 32419)
+++ trunk/blender/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp 2010-10-11 20:55:05 UTC (rev 32420)
@@ -431,6 +431,8 @@
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);
More information about the Bf-blender-cvs
mailing list