Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2015-05-04 14:53:07 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-05-04 14:53:23 +0300
commit5a8629c0d7da6cfb4b696f1787111c9492e03aba (patch)
treee061f915ed87cdb9d7c57fa63e614390cfe0851d /source/blender
parentbe30070d869906f6fd12fc0ca8dd24b85f6e33b6 (diff)
Different drawing for object centers.
Code here did depth test always and depth range 0.0. There is no real reason for object centers to write and get tested against depth buffer in this case, just disable the depth test instead ;) Helps with blurry object centers in depth of field mode too (centers wrote depth 0 and were always blurry)
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/space_view3d/drawobject.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 5b2ac50216a..de2b5a39313 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -735,11 +735,7 @@ 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];
- /* 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);
+ if (v3d->zbuf) glDisable(GL_DEPTH_TEST);
glEnable(GL_BLEND);
if (special_color) {
@@ -769,10 +765,9 @@ 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) glDepthFunc(GL_LEQUAL);
+ if (v3d->zbuf) glEnable(GL_DEPTH_TEST);
}
/* *********** text drawing for object/particles/armature ************* */