diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-08-06 12:01:07 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-08-06 12:01:07 +0300 |
commit | 8a8c3e09720c2ee3699066aa243baa56e30220a9 (patch) | |
tree | 4a8f71a260d2b138c5e699f6e57a218458c68081 /source/blender/gpu | |
parent | 6158f56f524c5000324903bfa3f1f5c43b22317b (diff) | |
parent | c872e87bd45acec5c986a64b1f6a60617174c286 (diff) |
Merge branch 'blender-v2.90-release' into master
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/GPU_immediate.h | 1 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_immediate.cc | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_immediate.h b/source/blender/gpu/GPU_immediate.h index 869c1fff29d..8e356cfb0e3 100644 --- a/source/blender/gpu/GPU_immediate.h +++ b/source/blender/gpu/GPU_immediate.h @@ -141,6 +141,7 @@ void immBindBuiltinProgram(eGPUBuiltinShader shader_id); /* Extend immUniformColor to take Blender's themes */ void immUniformThemeColor(int color_id); +void immUniformThemeColorAlpha(int color_id, float a); void immUniformThemeColor3(int color_id); void immUniformThemeColorShade(int color_id, int offset); void immUniformThemeColorShadeAlpha(int color_id, int color_offset, int alpha_offset); diff --git a/source/blender/gpu/intern/gpu_immediate.cc b/source/blender/gpu/intern/gpu_immediate.cc index ac3e653c9ff..7283f7c12aa 100644 --- a/source/blender/gpu/intern/gpu_immediate.cc +++ b/source/blender/gpu/intern/gpu_immediate.cc @@ -931,6 +931,14 @@ void immUniformThemeColor(int color_id) immUniformColor4fv(color); } +void immUniformThemeColorAlpha(int color_id, float a) +{ + float color[4]; + UI_GetThemeColor3fv(color_id, color); + color[3] = a; + immUniformColor4fv(color); +} + void immUniformThemeColor3(int color_id) { float color[3]; |