diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-05-04 19:00:29 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-05-04 19:00:29 +0300 |
commit | e10ecb6494e99e5880a1bad296464a2475feac8e (patch) | |
tree | 4e73b41f9e3291fb63cc0312ca4884639a38a58a /source/blender/editors/space_view3d | |
parent | 1b8069bdd921a2807f156682aec540f2acc37e3c (diff) |
Revert "Different drawing for object centers."
This reverts commit 5a8629c0d7da6cfb4b696f1787111c9492e03aba.
It does not really work that well since objects can draw in front of
selection circles now.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index de2b5a39313..5b2ac50216a 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -735,7 +735,11 @@ static void drawcentercircle(View3D *v3d, RegionView3D *rv3d, const float co[3], const float size = ED_view3d_pixel_size(rv3d, co) * (float)U.obcenter_dia * 0.5f; float verts[CIRCLE_RESOL][3]; - if (v3d->zbuf) glDisable(GL_DEPTH_TEST); + /* using gldepthfunc guarantees that it does write z values, + * but not checks for it, so centers remain visible independent order of drawing */ + if (v3d->zbuf) glDepthFunc(GL_ALWAYS); + /* write to near buffer always */ + glDepthRange(0.0, 0.0); glEnable(GL_BLEND); if (special_color) { @@ -765,9 +769,10 @@ static void drawcentercircle(View3D *v3d, RegionView3D *rv3d, const float co[3], /* finish up */ glDisableClientState(GL_VERTEX_ARRAY); + glDepthRange(0.0, 1.0); glDisable(GL_BLEND); - if (v3d->zbuf) glEnable(GL_DEPTH_TEST); + if (v3d->zbuf) glDepthFunc(GL_LEQUAL); } /* *********** text drawing for object/particles/armature ************* */ |