//i bind my shader
shader.bind();
// Then trying to set the value in my vertex shader like so:
GLuint test = glGetUniformLocation(shader.id(), "Test");
glUniform1f(test, 6.0f);
This is the value i want to change in my vertex shader:
uniform float Test = 0.66; // Doesn't work
//const float Test = 0.66; // Works
But my shader doesn't work when i try that. If i comment the OpenGL part out and if use the float as a const instead of a uniform then my shader works fine. But i want to be able to change that value from my OpenGL game.
Can someone tell me what i'm doing wrong..?