diff options
author | Mike Erwin <significant.bit@gmail.com> | 2016-10-19 03:22:22 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2016-10-19 03:22:22 +0300 |
commit | 54a0ff3ab5a46d2acf5761e799e9fa3604d980e5 (patch) | |
tree | 2e980f48aa98c60a53a2ca6ead583a7956177631 /source/blender/gpu/gawain | |
parent | e9268abf4a4b1a2ca72dad6088a0847b13cf381c (diff) |
Gawain: yet another way to set uniform color
Diffstat (limited to 'source/blender/gpu/gawain')
-rw-r--r-- | source/blender/gpu/gawain/immediate.c | 5 | ||||
-rw-r--r-- | source/blender/gpu/gawain/immediate.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/gpu/gawain/immediate.c b/source/blender/gpu/gawain/immediate.c index 2287950fdc5..30c82fd2710 100644 --- a/source/blender/gpu/gawain/immediate.c +++ b/source/blender/gpu/gawain/immediate.c @@ -736,6 +736,11 @@ void immUniformColor4fv(const float rgba[4]) immUniform4fv("color", rgba); } +void immUniformColor3f(float r, float g, float b) + { + immUniform4f("color", r, g, b, 1.0f); + } + void immUniformColor3fv(const float rgb[3]) { immUniform4f("color", rgb[0], rgb[1], rgb[2], 1.0f); diff --git a/source/blender/gpu/gawain/immediate.h b/source/blender/gpu/gawain/immediate.h index 271d8440219..ccf7ebe9400 100644 --- a/source/blender/gpu/gawain/immediate.h +++ b/source/blender/gpu/gawain/immediate.h @@ -83,6 +83,7 @@ void immUniform4fv(const char* name, const float data[4]); // the rgb functions have implicit alpha = 1.0 void immUniformColor4f(float r, float g, float b, float a); void immUniformColor4fv(const float rgba[4]); +void immUniformColor3f(float r, float g, float b); void immUniformColor3fv(const float rgb[3]); void immUniformColor3fvAlpha(const float rgb[3], float a); |