[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32223] trunk/blender/source/blender/ editors/mesh/editmesh_mods.c: attempt to fix [#21179] r26939 - Lasso tool does not work when drawing counter clock wise
Campbell Barton
ideasman42 at gmail.com
Fri Oct 1 09:49:01 CEST 2010
Revision: 32223
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32223
Author: campbellbarton
Date: 2010-10-01 09:49:00 +0200 (Fri, 01 Oct 2010)
Log Message:
-----------
attempt to fix [#21179] r26939 - Lasso tool does not work when drawing counter clock wise
can't test this so guessing this is caused by face culling.
Modified Paths:
--------------
trunk/blender/source/blender/editors/mesh/editmesh_mods.c
Modified: trunk/blender/source/blender/editors/mesh/editmesh_mods.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/editmesh_mods.c 2010-10-01 05:19:40 UTC (rev 32222)
+++ trunk/blender/source/blender/editors/mesh/editmesh_mods.c 2010-10-01 07:49:00 UTC (rev 32223)
@@ -258,6 +258,7 @@
unsigned int *dr, *drm;
struct ImBuf *buf, *bufmask;
int a;
+ GLboolean is_cull;
/* method in use for face selecting too */
if(vc->obedit==NULL) {
@@ -276,6 +277,10 @@
glDisable(GL_DEPTH_TEST);
glColor3ub(0, 0, 0);
+
+ /* some opengl drivers have problems with draw direction */
+ glGetBooleanv(GL_CULL_FACE, &is_cull);
+ if(is_cull) glDisable(GL_CULL_FACE);
/* yah, opengl doesn't do concave... tsk! */
ED_region_pixelspace(vc->ar);
@@ -302,6 +307,9 @@
}
IMB_freeImBuf(buf);
IMB_freeImBuf(bufmask);
+
+ if(is_cull) glEnable(GL_CULL_FACE);
+
return 1;
}
More information about the Bf-blender-cvs
mailing list