Viewport: draw floor routine should not use GL_ALWAYS for depth

(talked with merwin about that, and he agrees on it, we are not supposed to write to the scene depth buffer
but we should read its depth)
This commit is contained in:
Dalai Felinto 2016-10-06 22:21:12 +00:00
parent 490a938c8b
commit 82d069c232
1 changed files with 0 additions and 4 deletions

View File

@ -609,8 +609,6 @@ static void drawfloor(Scene *scene, View3D *v3d, const char **grid_unit, bool wr
immBindBuiltinProgram(GPU_SHADER_3D_FLAT_COLOR);
glDepthFunc(GL_ALWAYS); /* draw lines in order given */
immBegin(GL_LINES, vertex_ct);
/* draw normal grid lines */
@ -687,8 +685,6 @@ static void drawfloor(Scene *scene, View3D *v3d, const char **grid_unit, bool wr
immUnbindProgram();
/* done with XY plane */
glDepthFunc(GL_LESS); /* restore default */
}
if (show_axis_x || show_axis_y || show_axis_z) {