From f69678482c849d873b9686cd6068946205db7c2b Mon Sep 17 00:00:00 2001 From: Mike Erwin Date: Thu, 6 Apr 2017 19:15:26 -0400 Subject: OpenGL: refactor UI_draw_roundbox functions Each function takes a bool (filled vs outline) and a color. We already had multiple ways of passing color in; these are still here. Special variant for anti-aliasing. - took GLenum out of interface - removed UI_RB_ALPHA flag (only one place really used it) - use exact vertex count - removed redundant state changes (BLEND, LINE_SMOOTH) --- source/blender/editors/space_text/text_draw.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'source/blender/editors/space_text/text_draw.c') diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 4d587109155..f5a2bde814d 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -924,9 +924,7 @@ static void draw_textscroll(const SpaceText *st, rcti *scroll, rcti *back) rad = 0.4f * min_ii(BLI_rcti_size_x(&st->txtscroll), BLI_rcti_size_y(&st->txtscroll)); UI_GetThemeColor3fv(TH_HILITE, col); col[3] = 0.18f; - glEnable(GL_BLEND); - UI_draw_roundbox(st->txtscroll.xmin + 1, st->txtscroll.ymin, st->txtscroll.xmax - 1, st->txtscroll.ymax, rad, col); - glDisable(GL_BLEND); + UI_draw_roundbox_aa(true, st->txtscroll.xmin + 1, st->txtscroll.ymin, st->txtscroll.xmax - 1, st->txtscroll.ymax, rad, col); } /*********************** draw documentation *******************************/ -- cgit v1.2.3