Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2007-10-18 17:51:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-10-18 17:51:10 +0400
commitfde4edd1bd03bc8cc1b0878a1f72abc9a26fc8d3 (patch)
tree7e4e89ef9615c3aa0c9dcaf5b406dbc502126f0b /source/blender/src/drawmesh.c
parent6576464b0372d9701991ab15a23f7836999acdc3 (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.c10
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;