diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-03-25 20:56:19 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-03-25 21:11:01 +0300 |
commit | 59c562337291217c2fbd48adc8b3862c24771d09 (patch) | |
tree | ef2aafa38a9068aec432028198bc137e84d5448b /source/blender/draw/intern/draw_view.c | |
parent | 0495e689e60c313e039b09468307dcbab2a7ae1c (diff) |
Draw Manager: fix glitches when setting 3d cursor position by click.
Diffstat (limited to 'source/blender/draw/intern/draw_view.c')
-rw-r--r-- | source/blender/draw/intern/draw_view.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_view.c b/source/blender/draw/intern/draw_view.c index 2620989bcbe..80828d2f11c 100644 --- a/source/blender/draw/intern/draw_view.c +++ b/source/blender/draw/intern/draw_view.c @@ -553,7 +553,7 @@ void DRW_draw_background(void) /* Gradient background Color */ gpuMatrixBegin3D(); /* TODO: finish 2D API */ - glClear(GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); + glDisable(GL_DEPTH_TEST); VertexFormat *format = immVertexFormat(); unsigned pos = add_attrib(format, "pos", COMP_F32, 2, KEEP_FLOAT); @@ -578,6 +578,8 @@ void DRW_draw_background(void) immUnbindProgram(); gpuMatrixEnd(); + + glClear(GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); } else { /* Solid background Color */ |