diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-07-21 20:18:00 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-07-21 20:18:00 +0400 |
commit | 678892805ebcc97eafe9faf543c1e90e991776e9 (patch) | |
tree | 2e4b948cb305bb015b5e5eea6c11ccce70cde168 /source/blender/editors/transform | |
parent | b72af8c09a37854fa71f26b3d929cda41e003e44 (diff) |
Fix #22883: interface panels blank when drawing axis constraint.
GL_DEPTH_TEST was not incorrectly enabled in wireframe mode.
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r-- | source/blender/editors/transform/transform_constraints.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index fd5e0580911..0177d458868 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -620,6 +620,8 @@ void drawConstraint(const struct bContext *C, TransInfo *t) if (tc->mode & CON_SELECT) { float vec[3]; char col2[3] = {255,255,255}; + int depth_test_enabled; + convertViewVec(t, vec, (short)(t->mval[0] - t->con.imval[0]), (short)(t->mval[1] - t->con.imval[1])); add_v3_v3(vec, tc->center); @@ -629,15 +631,18 @@ void drawConstraint(const struct bContext *C, TransInfo *t) glColor3ubv((GLubyte *)col2); - glDisable(GL_DEPTH_TEST); + depth_test_enabled = glIsEnabled(GL_DEPTH_TEST); + if(depth_test_enabled) + glDisable(GL_DEPTH_TEST); + setlinestyle(1); glBegin(GL_LINE_STRIP); glVertex3fv(tc->center); glVertex3fv(vec); glEnd(); setlinestyle(0); - // TRANSFORM_FIX_ME - //if(G.vd->zbuf) + + if(depth_test_enabled) glEnable(GL_DEPTH_TEST); } |