diff options
author | Mike Erwin <significant.bit@gmail.com> | 2017-04-07 02:15:26 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2017-04-07 02:15:26 +0300 |
commit | f69678482c849d873b9686cd6068946205db7c2b (patch) | |
tree | 3ffd7dee52bac6d5706b5e6b64983290dd3ebed6 /source/blender/editors/space_outliner | |
parent | 934dfc420088b4ce06bb050ade1ab6a4fa8e6d72 (diff) |
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)
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_draw.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index e14a6fb6ec5..9836ae314d1 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -1251,13 +1251,14 @@ static void outliner_draw_iconrow(bContext *C, uiBlock *block, Scene *scene, Sce UI_draw_roundbox_corner_set(UI_CNR_ALL); color[3] *= alpha_fac; - UI_draw_roundbox( + UI_draw_roundbox_aa( + true, (float) *offsx + 1.0f * ufac, (float)ys + 1.0f * ufac, (float)*offsx + UI_UNIT_X - 1.0f * ufac, (float)ys + UI_UNIT_Y - ufac, (float)UI_UNIT_Y / 2.0f - ufac, - color); + color); glEnable(GL_BLEND); /* roundbox disables */ } @@ -1377,7 +1378,8 @@ static void outliner_draw_tree_element( /* active circle */ if (active != OL_DRAWSEL_NONE) { UI_draw_roundbox_corner_set(UI_CNR_ALL); - UI_draw_roundbox( + UI_draw_roundbox_aa( + true, (float)startx + UI_UNIT_X + 1.0f * ufac, (float)*starty + 1.0f * ufac, (float)startx + 2.0f * UI_UNIT_X - 1.0f * ufac, |