diff options
author | Mike Erwin <significant.bit@gmail.com> | 2016-10-17 00:04:17 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2016-10-17 00:48:35 +0300 |
commit | 36d2365ac312ad3cfe6de3a018d1c3bcdd84cc94 (patch) | |
tree | 849c49969e6510b3d74ad486543b728bd2dd85ca /source/blender | |
parent | 9cdf4afb76b1b5627bcad637dbd0d2452c472caf (diff) |
OpenGL: new immUniformThemeColorShadeAlpha function
Plus some naming cleanup.
Supports T49043
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/gpu/GPU_immediate.h | 7 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_immediate.c | 19 |
2 files changed, 17 insertions, 9 deletions
diff --git a/source/blender/gpu/GPU_immediate.h b/source/blender/gpu/GPU_immediate.h index 1b4f26a7640..0cb9d7929c9 100644 --- a/source/blender/gpu/GPU_immediate.h +++ b/source/blender/gpu/GPU_immediate.h @@ -41,6 +41,7 @@ void immBindBuiltinProgram(GPUBuiltinShader shader_id); /* * Extend immUniformColor to take Blender's themes */ -void immUniformThemeColor(int colorid); -void immUniformThemeColorShade(int colorid, int offset); -void immUniformThemeColorBlendShade(int colorid1, int colorid2, float fac, int offset); +void immUniformThemeColor(int color_id); +void immUniformThemeColorShade(int color_id, int offset); +void immUniformThemeColorShadeAlpha(int color_id, int color_offset, int alpha_offset); +void immUniformThemeColorBlendShade(int color_id1, int color_id2, float fac, int offset); diff --git a/source/blender/gpu/intern/gpu_immediate.c b/source/blender/gpu/intern/gpu_immediate.c index e0241dba893..711afda1992 100644 --- a/source/blender/gpu/intern/gpu_immediate.c +++ b/source/blender/gpu/intern/gpu_immediate.c @@ -38,23 +38,30 @@ void immBindBuiltinProgram(GPUBuiltinShader shader_id) gpuBindMatrices(shader->program); } -void immUniformThemeColor(int colorid) +void immUniformThemeColor(int color_id) { float color[4]; - UI_GetThemeColor4fv(colorid, color); + UI_GetThemeColor4fv(color_id, color); immUniformColor4fv(color); } -void immUniformThemeColorShade(int colorid, int offset) +void immUniformThemeColorShade(int color_id, int offset) { float color[4]; - UI_GetThemeColorShade4fv(colorid, offset, color); + UI_GetThemeColorShade4fv(color_id, offset, color); immUniformColor4fv(color); } -void immUniformThemeColorBlendShade(int colorid1, int colorid2, float fac, int offset) +void immUniformThemeColorShadeAlpha(int color_id, int color_offset, int alpha_offset) { float color[4]; - UI_GetThemeColorBlendShade4fv(colorid1, colorid2, fac, offset, color); + UI_GetThemeColorShadeAlpha4fv(color_id, color_offset, alpha_offset, color); + immUniformColor4fv(color); +} + +void immUniformThemeColorBlendShade(int color_id1, int color_id2, float fac, int offset) +{ + float color[4]; + UI_GetThemeColorBlendShade4fv(color_id1, color_id2, fac, offset, color); immUniformColor4fv(color); } |