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

Method setUniform1f

cpp/5_Domain_Specific/smokeParticles/GLSLProgram.cpp:52–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50void GLSLProgram::disable() { glUseProgram(0); }
51
52void GLSLProgram::setUniform1f(const char *name, float value)
53{
54 GLint loc = glGetUniformLocation(mProg, name);
55
56 if (loc >= 0) {
57 glUniform1f(loc, value);
58 }
59 else {
60#if _DEBUG
61 fprintf(stderr, "Error setting parameter '%s'\n", name);
62#endif
63 }
64}
65
66void GLSLProgram::setUniform2f(const char *name, float x, float y)
67{

Callers 2

drawPointSpritesMethod · 0.80
blurLightBufferMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected