Commit: 54a0ff3ab5a46d2acf5761e799e9fa3604d980e5
Author: Mike Erwin
Date:   Tue Oct 18 20:22:22 2016 -0400
Branches: blender2.8
https://developer.blender.org/rB54a0ff3ab5a46d2acf5761e799e9fa3604d980e5

Gawain: yet another way to set uniform color

===================================================================

M       source/blender/gpu/gawain/immediate.c
M       source/blender/gpu/gawain/immediate.h

===================================================================

diff --git a/source/blender/gpu/gawain/immediate.c 
b/source/blender/gpu/gawain/immediate.c
index 2287950..30c82fd 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 271d844..ccf7ebe 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);

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to