Skip to content

Commit

Permalink
The return value from glGetUniformLocation() is of course signed.
Browse files Browse the repository at this point in the history
  • Loading branch information
sesse committed Oct 1, 2012
1 parent 19a5a44 commit f428e5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions effect.cpp
Expand Up @@ -12,7 +12,7 @@
void set_uniform_float(GLhandleARB glsl_program_num, const std::string &prefix, const std::string &key, float value)
{
std::string name = prefix + "_" + key;
GLuint l = glGetUniformLocation(glsl_program_num, name.c_str());
GLint l = glGetUniformLocation(glsl_program_num, name.c_str());
if (l == -1) {
return;
}
Expand All @@ -24,7 +24,7 @@ void set_uniform_float(GLhandleARB glsl_program_num, const std::string &prefix,
void set_uniform_vec3(GLhandleARB glsl_program_num, const std::string &prefix, const std::string &key, const float *values)
{
std::string name = prefix + "_" + key;
GLuint l = glGetUniformLocation(glsl_program_num, name.c_str());
GLint l = glGetUniformLocation(glsl_program_num, name.c_str());
if (l == -1) {
return;
}
Expand Down

0 comments on commit f428e5f

Please sign in to comment.