demos: rename InitUniforms() to SetUniformValues()
And call new PrintUniforms() in demos.
This commit is contained in:
@@ -148,7 +148,8 @@ Init(void)
|
||||
|
||||
glUseProgram(program);
|
||||
|
||||
InitUniforms(program, Uniforms);
|
||||
SetUniformValues(program, Uniforms);
|
||||
PrintUniforms(Uniforms);
|
||||
|
||||
assert(glGetError() == 0);
|
||||
|
||||
|
@@ -242,7 +242,8 @@ Init(void)
|
||||
|
||||
CheckError(__LINE__);
|
||||
|
||||
InitUniforms(program, Uniforms);
|
||||
SetUniformValues(program, Uniforms);
|
||||
PrintUniforms(Uniforms);
|
||||
|
||||
CheckError(__LINE__);
|
||||
|
||||
|
@@ -159,7 +159,8 @@ Init(void)
|
||||
|
||||
glUseProgram(program);
|
||||
|
||||
InitUniforms(program, Uniforms);
|
||||
SetUniformValues(program, Uniforms);
|
||||
PrintUniforms(Uniforms);
|
||||
|
||||
uZoom = glGetUniformLocation(program, "Zoom");
|
||||
uXcenter = glGetUniformLocation(program, "Xcenter");
|
||||
|
@@ -328,7 +328,8 @@ CreateProgram(const char *vertProgFile, const char *fragProgFile,
|
||||
|
||||
glUseProgram(program);
|
||||
|
||||
InitUniforms(program, uniforms);
|
||||
SetUniformValues(program, uniforms);
|
||||
PrintUniforms(Uniforms);
|
||||
|
||||
VertCoord_attr = glGetAttribLocation(program, "VertCoord");
|
||||
if (VertCoord_attr > 0) {
|
||||
|
@@ -179,7 +179,8 @@ Init(void)
|
||||
|
||||
glUseProgram(program);
|
||||
|
||||
InitUniforms(program, Uniforms);
|
||||
SetUniformValues(program, Uniforms);
|
||||
PrintUniforms(Uniforms);
|
||||
|
||||
assert(glGetError() == 0);
|
||||
|
||||
|
@@ -382,7 +382,8 @@ CreateProgram(const char *vertProgFile, const char *fragProgFile,
|
||||
|
||||
glUseProgram(program);
|
||||
|
||||
InitUniforms(program, uniforms);
|
||||
SetUniformValues(program, uniforms);
|
||||
PrintUniforms(uniforms);
|
||||
|
||||
return program;
|
||||
}
|
||||
|
@@ -173,7 +173,8 @@ Init(void)
|
||||
|
||||
glUseProgram(program);
|
||||
|
||||
InitUniforms(program, Uniforms);
|
||||
SetUniformValues(program, Uniforms);
|
||||
PrintUniforms(Uniforms);
|
||||
|
||||
assert(glGetError() == 0);
|
||||
|
||||
|
@@ -122,7 +122,7 @@ LinkShaders(GLuint vertShader, GLuint fragShader)
|
||||
|
||||
|
||||
void
|
||||
InitUniforms(GLuint program, struct uniform_info uniforms[])
|
||||
SetUniformValues(GLuint program, struct uniform_info uniforms[])
|
||||
{
|
||||
GLuint i;
|
||||
|
||||
|
@@ -37,7 +37,7 @@ extern GLuint
|
||||
LinkShaders(GLuint vertShader, GLuint fragShader);
|
||||
|
||||
extern void
|
||||
InitUniforms(GLuint program, struct uniform_info uniforms[]);
|
||||
SetUniformValues(GLuint program, struct uniform_info uniforms[]);
|
||||
|
||||
extern GLuint
|
||||
GetUniforms(GLuint program, struct uniform_info uniforms[]);
|
||||
|
Reference in New Issue
Block a user