diff options
author | Andre Susano Pinto <andresusanopinto@gmail.com> | 2008-06-12 02:53:52 +0400 |
---|---|---|
committer | Andre Susano Pinto <andresusanopinto@gmail.com> | 2008-06-12 02:53:52 +0400 |
commit | 39d35edbe680424f88ddc2cff8ecd86fb77fae89 (patch) | |
tree | 2339f4372eb36dd2b5a36500c9c6ea484d4c39c5 /source/gameengine/GamePlayer/common | |
parent | b5432c6780d41302155f8aad382be173341bdea2 (diff) |
Merge from trunk
svn merge -r 15104:15202 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Diffstat (limited to 'source/gameengine/GamePlayer/common')
-rw-r--r-- | source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp b/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp index 46fe24d8b87..c2f15aefe16 100644 --- a/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp +++ b/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp @@ -154,16 +154,23 @@ int set_tpage(MTFace *tface) fAlphamode= tface->transp; if(fAlphamode) { - glEnable(GL_BLEND); - if(fAlphamode==TF_ADD) { + glEnable(GL_BLEND); glBlendFunc(GL_ONE, GL_ONE); + glDisable ( GL_ALPHA_TEST ); /* glBlendEquationEXT(GL_FUNC_ADD_EXT); */ } else if(fAlphamode==TF_ALPHA) { + glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glDisable ( GL_ALPHA_TEST ); /* glBlendEquationEXT(GL_FUNC_ADD_EXT); */ } + else if (fAlphamode==TF_CLIP){ + glDisable(GL_BLEND); + glEnable ( GL_ALPHA_TEST ); + glAlphaFunc(GL_GREATER, 0.5f); + } /* else { */ /* glBlendFunc(GL_ONE, GL_ONE); */ /* glBlendEquationEXT(GL_FUNC_REVERSE_SUBTRACT_EXT); */ |