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:
authorDalai Felinto <dfelinto@gmail.com>2016-10-13 02:01:59 +0300
committerDalai Felinto <dfelinto@gmail.com>2016-10-13 03:36:52 +0300
commite79f302f1613adfb957c2f8f5fca50aba7f25259 (patch)
treef0ce5151d625f27cc4a95c310bd7a115fb578b45 /source/blender/gpu/intern/gpu_immediate.c
parentf6e7e46fac71eda949858edcf21fab79a5a2573f (diff)
gawain/immediate mode: new util functions for color uniforms
Diffstat (limited to 'source/blender/gpu/intern/gpu_immediate.c')
-rw-r--r--source/blender/gpu/intern/gpu_immediate.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_immediate.c b/source/blender/gpu/intern/gpu_immediate.c
index 5faedbae04d..444a8850452 100644
--- a/source/blender/gpu/intern/gpu_immediate.c
+++ b/source/blender/gpu/intern/gpu_immediate.c
@@ -27,6 +27,8 @@
#include "GPU_immediate.h"
#include "GPU_matrix.h"
+#include "UI_resources.h"
+
#include "gpu_shader_private.h"
void immBindBuiltinProgram(GPUBuiltinShader shader_id)
@@ -35,3 +37,17 @@ void immBindBuiltinProgram(GPUBuiltinShader shader_id)
immBindProgram(shader->program);
gpuBindMatrices(shader->program);
}
+
+void immUniformThemeColor(int colorid)
+{
+ float color[4];
+ UI_GetThemeColor4fv(colorid, color);
+ immUniformColor4fv(color);
+}
+
+void immUniformThemeColorShade(int colorid, int offset)
+{
+ float color[4];
+ UI_GetThemeColorShade4fv(colorid, offset, color);
+ immUniformColor4fv(color);
+} \ No newline at end of file