diff options
author | Ton Roosendaal <ton@blender.org> | 2010-11-10 18:10:54 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2010-11-10 18:10:54 +0300 |
commit | b8a3daea31335b75eb0548aeed5b3e94adee6f7c (patch) | |
tree | 8166fbc239ea2d381a4b291b08d3e607ea2bfdb5 /source/blender/editors/mesh/loopcut.c | |
parent | 97984e65624ab3c3f6ec66a97ea0bd0cd327c2a5 (diff) |
Bugfix #24603
Using ALT+B clipping and CTRL+R loopcut in wireframe mode, made 3d drawing
disappear. Was caused by faulty setting of zbuffering on in loopcut code.
Diffstat (limited to 'source/blender/editors/mesh/loopcut.c')
-rw-r--r-- | source/blender/editors/mesh/loopcut.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/loopcut.c b/source/blender/editors/mesh/loopcut.c index ac65a3c21d3..e8588679697 100644 --- a/source/blender/editors/mesh/loopcut.c +++ b/source/blender/editors/mesh/loopcut.c @@ -94,13 +94,15 @@ typedef struct tringselOpData { } tringselOpData; /* modal loop selection drawing callback */ -static void ringsel_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void *arg) +static void ringsel_draw(const bContext *C, ARegion *UNUSED(ar), void *arg) { - int i; + View3D *v3d = CTX_wm_view3d(C); tringselOpData *lcd = arg; + int i; if (lcd->totedge > 0) { - glDisable(GL_DEPTH_TEST); + if(v3d && v3d->zbuf) + glDisable(GL_DEPTH_TEST); glPushMatrix(); glMultMatrixf(lcd->ob->obmat); @@ -114,7 +116,8 @@ static void ringsel_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void *a glEnd(); glPopMatrix(); - glEnable(GL_DEPTH_TEST); + if(v3d && v3d->zbuf) + glEnable(GL_DEPTH_TEST); } } |