Fix T43531: Wrong object center-dot color

Write objects center point to the nearest depth.
This commit is contained in:
Campbell Barton
2015-02-05 16:54:18 +11:00
parent 4e27f63828
commit 57e1a5373f

View File

@@ -740,6 +740,8 @@ static void drawcentercircle(View3D *v3d, RegionView3D *rv3d, const float co[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);
glEnable(GL_BLEND);
if (special_color) {
@@ -769,6 +771,7 @@ 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);