diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-10-18 17:51:10 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-10-18 17:51:10 +0400 |
commit | fde4edd1bd03bc8cc1b0878a1f72abc9a26fc8d3 (patch) | |
tree | 7e4e89ef9615c3aa0c9dcaf5b406dbc502126f0b /source/blender/src/drawmesh.c | |
parent | 6576464b0372d9701991ab15a23f7836999acdc3 (diff) |
Use GL_ALPHA_TEST when drawing alpha faces in the 3d view, as suggested by Eskil, some scenes are unusable without this.
at the moment it wont draw totally transperent pixels, this may need to be adjusted or made into a preference.
Diffstat (limited to 'source/blender/src/drawmesh.c')
-rw-r--r-- | source/blender/src/drawmesh.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/src/drawmesh.c b/source/blender/src/drawmesh.c index 32ed6be0f6b..6fbd0c71997 100644 --- a/source/blender/src/drawmesh.c +++ b/source/blender/src/drawmesh.c @@ -239,14 +239,22 @@ int set_tpage(MTFace *tface) } else if(alphamode==TF_ALPHA) { glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + /* added after 2.45 to clip alpha */ + glEnable ( GL_ALPHA_TEST ); + glAlphaFunc ( GL_GREATER, 0.001 ); + + /* glBlendEquationEXT(GL_FUNC_ADD_EXT); */ } /* else { */ /* glBlendFunc(GL_ONE, GL_ONE); */ /* glBlendEquationEXT(GL_FUNC_REVERSE_SUBTRACT_EXT); */ /* } */ + } else { + glDisable(GL_BLEND); + glDisable ( GL_ALPHA_TEST ); } - else glDisable(GL_BLEND); } ima= tface->tpage; |