diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-07-03 20:22:00 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-07-03 20:22:15 +0300 |
commit | bb9355e7031404a4e0374ad49928e0fcad1f0aaa (patch) | |
tree | 7750e6d58dea5b8cb0e841b751bbb5d31d315b51 /source/blender/draw/intern/draw_manager_text.c | |
parent | 79152371c3c259fed9d1106aa8003beef28168e6 (diff) |
View3D: Remove v3d->zbuf
This is because depth test is set before drawing anything now. There is no
case where we want to draw without depth test that is not selection and
this case is not handle by v3d->zbuf anymore.
UI assume depth test is off by default. The DRWManager assume it's on.
This should fix T55623.
Diffstat (limited to 'source/blender/draw/intern/draw_manager_text.c')
-rw-r--r-- | source/blender/draw/intern/draw_manager_text.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/source/blender/draw/intern/draw_manager_text.c b/source/blender/draw/intern/draw_manager_text.c index 56255af98ce..1f385b958b8 100644 --- a/source/blender/draw/intern/draw_manager_text.c +++ b/source/blender/draw/intern/draw_manager_text.c @@ -111,9 +111,7 @@ void DRW_text_cache_add( } } -void DRW_text_cache_draw( - DRWTextStore *dt, - View3D *v3d, ARegion *ar, bool depth_write) +void DRW_text_cache_draw(DRWTextStore *dt, ARegion *ar) { RegionView3D *rv3d = ar->regiondata; ViewCachedString *vos; @@ -149,13 +147,6 @@ void DRW_text_cache_draw( gpuPushMatrix(); gpuLoadIdentity(); - if (depth_write) { - if (v3d->zbuf) glDisable(GL_DEPTH_TEST); - } - else { - glDepthMask(GL_FALSE); - } - const int font_id = BLF_default(); const uiStyle *style = UI_style_get(); @@ -171,7 +162,7 @@ void DRW_text_cache_draw( BLF_position( font_id, - (float)(vos->sco[0] + vos->xoffs), (float)(vos->sco[1]), (depth_write) ? 0.0f : 2.0f); + (float)(vos->sco[0] + vos->xoffs), (float)(vos->sco[1]), 2.0f); ((vos->flag & DRW_TEXT_CACHE_ASCII) ? BLF_draw_ascii : @@ -182,13 +173,6 @@ void DRW_text_cache_draw( } } - if (depth_write) { - if (v3d->zbuf) glEnable(GL_DEPTH_TEST); - } - else { - glDepthMask(GL_TRUE); - } - gpuPopMatrix(); gpuLoadProjectionMatrix(original_proj); |