UI: Fix waveform widget text drawing.
Flush the text cache so that we have proper scissor test and ordering.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user