Commit d45675a3 authored by Jan Möbius's avatar Jan Möbius
Browse files

Christopher: Shaderutils uniform setter für float arrays

git-svn-id: 383ad7c9-94d9-4d36-a494-682f7c89f535
parent c5898d91
......@@ -326,6 +326,14 @@ namespace GLSL {
void Program::setUniform(const char *name, GLfloat *values, int count) {
GLint location = glGetUniformLocation(this->m_programId, name);
glUniform1fv(location, count, values);
void Program::setUniform(const char *name, int index, bool value) {
char varName[1024];
snprintf(varName, 1024, "%s[%d]", name, index);
......@@ -146,6 +146,7 @@ namespace GLSL {
void setUniform(const char *name, const ACG::Vec4f &value);
void setUniform(const char *name, GLint *value, int count);
void setUniform(const char *name, GLfloat *value, int count);
// set element of array
void setUniform(const char *name, int index, bool value);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment