Commit: 6bfb9b7b5f164b303433d729d1cbe38f1ba44366 Author: Mike Erwin Date: Wed Apr 12 18:20:58 2017 -0400 Branches: blender2.8 https://developer.blender.org/rB6bfb9b7b5f164b303433d729d1cbe38f1ba44366
Gawain: add immUniform4iv Needed soon by OCIO. =================================================================== M intern/gawain/gawain/immediate.h M intern/gawain/src/immediate.c =================================================================== diff --git a/intern/gawain/gawain/immediate.h b/intern/gawain/gawain/immediate.h index 6a039542065..62754306abe 100644 --- a/intern/gawain/gawain/immediate.h +++ b/intern/gawain/gawain/immediate.h @@ -79,6 +79,7 @@ void immVertex2iv(unsigned attrib_id, const int data[2]); // provide uniform values that don't change for the entire draw call void immUniform1i(const char* name, int x); +void immUniform4iv(const char* name, const int data[4]); void immUniform1f(const char* name, float x); void immUniform2f(const char* name, float x, float y); void immUniform2fv(const char* name, const float data[2]); diff --git a/intern/gawain/src/immediate.c b/intern/gawain/src/immediate.c index c6d87cbc029..2fd2d2480a7 100644 --- a/intern/gawain/src/immediate.c +++ b/intern/gawain/src/immediate.c @@ -827,6 +827,16 @@ void immUniform1i(const char* name, int x) glUniform1i(loc, x); } +void immUniform4iv(const char* name, const int data[4]) + { + int loc = glGetUniformLocation(imm.bound_program, name); + +#if TRUST_NO_ONE + assert(loc != -1); +#endif + + glUniform4iv(loc, 1, data); + } // --- convenience functions for setting "uniform vec4 color" --- _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs