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/gpu/gawain/immediate.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/gpu/gawain/immediate.c')
-rw-r--r-- | source/blender/gpu/gawain/immediate.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/gpu/gawain/immediate.c b/source/blender/gpu/gawain/immediate.c index b7b3083166e..07903dcf6ac 100644 --- a/source/blender/gpu/gawain/immediate.c +++ b/source/blender/gpu/gawain/immediate.c @@ -655,6 +655,11 @@ void immUniformColor3fv(const float rgb[3]) immUniform4f("color", rgb[0], rgb[1], rgb[2], 1.0f); } +void immUniformColor3fvAlpha(float rgb[3], float alpha) + { + immUniform4f("color",rgb[0], rgb[1], rgb[2], alpha); + } + void immUniformColor4fv(const float rgba[4]) { immUniform4f("color", rgba[0], rgba[1], rgba[2], rgba[3]); @@ -682,6 +687,11 @@ void immUniformColor4ubv(const unsigned char rgba[4]) immUniformColor4ub(rgba[0], rgba[1], rgba[2], rgba[3]); } +void immUniformColor4f(float r, float g, float b, float a) + { + immUniform4f("color", r, g, b, a); + } + void immUniform1i(const char *name, const unsigned int data) { int loc = glGetUniformLocation(imm.bound_program, name); |