diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-08-21 16:20:31 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-08-21 16:20:31 +0400 |
commit | 76a4d91dc4214c1b3992e9389d434356033ac108 (patch) | |
tree | fdff8a893dbd4462bc91a33a7a652837579f6596 /source/blender/editors | |
parent | 649743dfd6720bcf788abf041e3cf60a4bbcccce (diff) |
Fix #36499: proportional edit circle was drawing behind objects in some cases,
now it always draws in front to ensure the circle is visible.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/transform/transform_constraints.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index fd8fba91fc9..a73bf86feb1 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -727,6 +727,7 @@ void drawPropCircle(const struct bContext *C, TransInfo *t) RegionView3D *rv3d = CTX_wm_region_view3d(C); float tmat[4][4], imat[4][4]; float center[3]; + int depth_test_enabled; UI_ThemeColor(TH_GRID); @@ -759,10 +760,17 @@ void drawPropCircle(const struct bContext *C, TransInfo *t) glScalef(1.0f / aspx, 1.0f / aspy, 1.0); } + depth_test_enabled = glIsEnabled(GL_DEPTH_TEST); + if (depth_test_enabled) + glDisable(GL_DEPTH_TEST); + set_inverted_drawing(1); drawcircball(GL_LINE_LOOP, center, t->prop_size, imat); set_inverted_drawing(0); + if (depth_test_enabled) + glEnable(GL_DEPTH_TEST); + glPopMatrix(); } } |