diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-10-01 11:49:00 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-10-01 11:49:00 +0400 |
commit | 65b92821e1c6032626514217db5857d47cc2c122 (patch) | |
tree | d86fe4024fa2dea051246a7f26cf3d4d2c187706 | |
parent | 3dea67a3fd7ea7bc37e96635621655e5075444ee (diff) |
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.
-rw-r--r-- | source/blender/editors/mesh/editmesh_mods.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c index 799cca2222a..5a33d60b00e 100644 --- a/source/blender/editors/mesh/editmesh_mods.c +++ b/source/blender/editors/mesh/editmesh_mods.c @@ -258,6 +258,7 @@ int EM_mask_init_backbuf_border(ViewContext *vc, short mcords[][2], short tot, s 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 @@ int EM_mask_init_backbuf_border(ViewContext *vc, short mcords[][2], short tot, s 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 @@ int EM_mask_init_backbuf_border(ViewContext *vc, short mcords[][2], short tot, s } IMB_freeImBuf(buf); IMB_freeImBuf(bufmask); + + if(is_cull) glEnable(GL_CULL_FACE); + return 1; } |