I have a shader that has the following uniform declared:
uniform highp float fr;
In my rendering method, it gets set accordingly:
GLfloat num = 1.0f;
glUniform1f(glGetUniformLocation(self.Program, "fr"), num);
But it doesn’t get set at all. These seems pretty basic so I can’t spot why it isn’t working.
Have I used the correct syntax?
I have found my issue.
I was setting the uniform before calling use program. For anyone that finds this answer, ensure you call use program before setting the uniform for that program.