diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-04-07 15:03:32 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-04-07 15:03:32 +0300 |
commit | 1a337074175e51c705de0afd230264ff73e04b4b (patch) | |
tree | 345d532d9c26ac2df3a6b55f9ab34de67487307e /source/blender/editors/interface/interface_draw.c | |
parent | 2d618974d14672e6ec38612e76aca70e619f7242 (diff) |
UI: Fix waveform widget text drawing.
Flush the text cache so that we have proper scissor test and ordering.
Diffstat (limited to 'source/blender/editors/interface/interface_draw.c')
-rw-r--r-- | source/blender/editors/interface/interface_draw.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index 786c3637e3d..f84347b97a4 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -910,6 +910,9 @@ void ui_draw_but_WAVEFORM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol), } } + /* Flush text cache before changing scissors. */ + BLF_batch_draw_flush(); + glEnable(GL_BLEND); glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); @@ -934,6 +937,9 @@ void ui_draw_but_WAVEFORM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol), BLF_draw_default(rect.xmin + 1, yofs - 5 + (i * 0.2f) * h, 0, str, sizeof(str) - 1); } + /* Flush text cache before drawing things on top. */ + BLF_batch_draw_flush(); + glEnable(GL_BLEND); glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); |