MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / setIntArrayUniform

Method setIntArrayUniform

testbed/opengl-framework/src/Shader.h:220–226  ·  view source on GitHub ↗

Set an array of int uniform values to this shader (be careful if the uniform is not used in the shader, the compiler will remove it, then when you will try to set it, an assert will occur)

Source from the content-addressed store, hash-verified

218// used in the shader, the compiler will remove it, then when you will try
219// to set it, an assert will occur)
220inline void Shader::setIntArrayUniform(const std::string& variableName, GLint* values, int nbValues, bool errorIfMissing) const {
221 assert(mProgramObjectID != 0);
222 GLint location = getUniformLocation(variableName, errorIfMissing);
223 if (location != -1) {
224 glUniform1iv(location, nbValues, values);
225 }
226}
227// Set a vector 2 uniform value to this shader (be careful if the uniform is not
228// used in the shader, the compiler will remove it, then when you will try
229// to set it, an assert will occur)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected