diff options
author | Mike Erwin <significant.bit@gmail.com> | 2016-10-07 21:56:08 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2016-10-07 22:03:21 +0300 |
commit | b613d25354cbf7743836e9b1c07f8c503c0a5695 (patch) | |
tree | b4349432228d16946236ede1393478cd9f73f0af /source/blender/editors/interface/interface_widgets.c | |
parent | 5c23b863f8c62e88406911aa90682fba8d434c16 (diff) |
Blender 2.8: OpenGL: replace old GL with the new immediate API in UI_draw_roundbox_gl_mode
I change UI_draw_roundbox_gl_mode to use immediate API.
The rest of the change is the call to the function.
I also make some change in UI_ThemeColor4(int colorid) for eg to make convenience to use.
I would really like to know if it's the good way to do, if yes I will make all the change in the node_daw.c after, else say me what's wrong and how to deal with color else.
Reviewers: merwin, dfelinto, Severin
Reviewed By: merwin
Subscribers: fablefox, Severin
Tags: #bf_blender_2.8, #opengl_gfx
Maniphest Tasks: T49043
Differential Revision: https://developer.blender.org/D2274
Diffstat (limited to 'source/blender/editors/interface/interface_widgets.c')
-rw-r--r-- | source/blender/editors/interface/interface_widgets.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 321d4b3e1f5..62e676d2a6a 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -218,16 +218,15 @@ void ui_draw_anti_roundbox(int mode, float minx, float miny, float maxx, float m int j; glEnable(GL_BLEND); - glGetFloatv(GL_CURRENT_COLOR, color); + glGetFloatv(GL_CURRENT_COLOR, color); // I will make the change in a futur patch, use as it is for now if (use_alpha) { color[3] = 0.5f; } color[3] *= 0.125f; - glColor4fv(color); for (j = 0; j < WIDGET_AA_JITTER; j++) { glTranslate2fv(jit[j]); - UI_draw_roundbox_gl_mode(mode, minx, miny, maxx, maxy, rad); + UI_draw_roundbox_gl_mode(mode, minx, miny, maxx, maxy, rad, color); glTranslatef(-jit[j][0], -jit[j][1], 0.0f); } |