[Bf-blender-cvs] [1e21b8d] blender2.8: OpenGL: another way to set uniform theme color
Mike Erwin
noreply at git.blender.org
Wed Dec 14 08:44:44 CET 2016
Commit: 1e21b8dc1b26e985385717491cb557fd2e80a7ae
Author: Mike Erwin
Date: Tue Dec 13 16:45:59 2016 -0500
Branches: blender2.8
https://developer.blender.org/rB1e21b8dc1b26e985385717491cb557fd2e80a7ae
OpenGL: another way to set uniform theme color
===================================================================
M source/blender/gpu/GPU_immediate.h
M source/blender/gpu/intern/gpu_immediate.c
===================================================================
diff --git a/source/blender/gpu/GPU_immediate.h b/source/blender/gpu/GPU_immediate.h
index 0cb9d79..f601d06 100644
--- a/source/blender/gpu/GPU_immediate.h
+++ b/source/blender/gpu/GPU_immediate.h
@@ -45,3 +45,4 @@ 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);
+void immUniformThemeColorBlend(int color_id1, int color_id2, float fac);
diff --git a/source/blender/gpu/intern/gpu_immediate.c b/source/blender/gpu/intern/gpu_immediate.c
index 0706c74..685c31d 100644
--- a/source/blender/gpu/intern/gpu_immediate.c
+++ b/source/blender/gpu/intern/gpu_immediate.c
@@ -64,3 +64,10 @@ void immUniformThemeColorBlendShade(int color_id1, int color_id2, float fac, int
UI_GetThemeColorBlendShade4fv(color_id1, color_id2, fac, offset, color);
immUniformColor4fv(color);
}
+
+void immUniformThemeColorBlend(int color_id1, int color_id2, float fac)
+{
+ uint8_t color[3];
+ UI_GetThemeColorBlend3ubv(color_id1, color_id2, fac, color);
+ immUniformColor3ubv(color);
+}
More information about the Bf-blender-cvs
mailing list