diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2013-03-04 12:22:20 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2013-03-04 12:22:20 +0400 |
commit | a3b47ede1776e1a3ef9514b152d880d2c98d597a (patch) | |
tree | b2016a1387866cf621858ec6cb723825ecb0560c /source/gameengine/Rasterizer | |
parent | 9b5edeb8819e7760f8e1755139c265fbcc13e6f4 (diff) |
BGE bug-fix[#34523] 2dfilter produces render error (objects disappear) - likely an alpha problem
Fix for 2.66a
With help from Daniel Stokes and Mitchell Stokes.
This bug always existed in OSX, but started showing up in Windows and Linux on review (54745 + 54747)
[the patch to enable alpha buffer for all OSs]
A better fix would be to use RAS_IRasterizer::SetAlphaBlend(GPU_BLEND_SOLID);
but I think gpu_verify_alpha_blend() is not switching to SOLID because
GTS.alphablend is GPU_BLEND_SOLID (even though GL_ALPHA_TEST is enabled).
Anyways, this is not something worth tackling now, since in terms of functionality it shouldn't matter.
Diffstat (limited to 'source/gameengine/Rasterizer')
-rw-r--r-- | source/gameengine/Rasterizer/RAS_2DFilterManager.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp index ab0f62c84c7..8a8dc37443b 100644 --- a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp +++ b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp @@ -435,6 +435,9 @@ void RAS_2DFilterManager::RenderFilters(RAS_ICanvas* canvas) glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); // if the last rendered face had alpha add it would messes with the color of the plane we apply 2DFilter to glDisable(GL_BLEND); + // fix for [#34523] alpha buffer is now available for all OSs + glDisable(GL_ALPHA_TEST); + glPushMatrix(); //GL_MODELVIEW glLoadIdentity(); // GL_MODELVIEW glMatrixMode(GL_TEXTURE); |