MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / setUniform4f

Method setUniform4f

cpp/5_Domain_Specific/smokeParticles/GLSLProgram.cpp:94–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94void GLSLProgram::setUniform4f(const char *name, float x, float y, float z, float w)
95{
96 GLint loc = glGetUniformLocation(mProg, name);
97
98 if (loc >= 0) {
99 glUniform4f(loc, x, y, z, w);
100 }
101 else {
102#if _DEBUG
103 fprintf(stderr, "Error setting parameter '%s'\n", name);
104#endif
105 }
106}
107
108void GLSLProgram::setUniformMatrix4fv(const GLchar *name, GLfloat *m, bool transpose)
109{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected