Fix T43531: Wrong object center-dot color
Write objects center point to the nearest depth.
This commit is contained in:
parent
4e27f63828
commit
57e1a5373f
Notes:
blender-bot
2023-02-14 09:32:03 +01:00
Referenced by issue #43531, Greyish origin.
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue