diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-02-28 17:15:34 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-02-28 17:15:34 +0300 |
commit | 7175838b6166f1d37d96cad5c5aa4a8c89a5bfc2 (patch) | |
tree | e689032a43dc2a0c9ea057006fa6d583c93ba8ac | |
parent | 96d63d2232919e064d27f337b728065044736149 (diff) |
Draw Manager: Fix ortho grid in front of overlays.
-rw-r--r-- | source/blender/draw/intern/draw_view.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_view.c b/source/blender/draw/intern/draw_view.c index f3865a7a92f..1983c1cd6ed 100644 --- a/source/blender/draw/intern/draw_view.c +++ b/source/blender/draw/intern/draw_view.c @@ -522,9 +522,11 @@ void DRW_draw_grid(void) glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LESS); - glDepthMask(GL_TRUE); if (!draw_floor) { + /* Do not get in front of overlays */ + glDepthMask(GL_FALSE); + ED_region_pixelspace(ar); *(&grid_unit) = NULL; /* drawgrid need this to detect/affect smallest valid unit... */ drawgrid(&scene->unit, ar, v3d, &grid_unit); @@ -535,6 +537,7 @@ void DRW_draw_grid(void) glLoadMatrixf((float *)rv3d->viewmat); } else { + glDepthMask(GL_TRUE); drawfloor(scene, v3d, &grid_unit); } } |