Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-08-06 11:28:22 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-08-06 11:59:20 +0300
commitc872e87bd45acec5c986a64b1f6a60617174c286 (patch)
treef1068dfec40ae2d69d5781cd30a6af382736e12b /source/blender/gpu
parentd4804f00fbbd6da311c49b2ae498a4cadf9efe92 (diff)
Fix T79309: Safe Areas are not visible
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/GPU_immediate.h1
-rw-r--r--source/blender/gpu/intern/gpu_immediate.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_immediate.h b/source/blender/gpu/GPU_immediate.h
index 698c4585d20..33880010ef7 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.c b/source/blender/gpu/intern/gpu_immediate.c
index 4f5cb3fcc91..1e99371f9a1 100644
--- a/source/blender/gpu/intern/gpu_immediate.c
+++ b/source/blender/gpu/intern/gpu_immediate.c
@@ -934,6 +934,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];