uniform vec3 LightPosition;//vertex header
int pnt = glGetUniformLocation(shaderProgram[0], "LightPosition");//source
Somewhat weird problem with GL shader compiler
I verified that both the vertex and fragment shader in the program are functioning but glGetUniformLocation is still returning -1 for uniform variables that were working 10 minutes ago. I don't think I altered any related code and there are no compile or link errors.
Pretty straight forward I think.
What does the shader look like? If the variable doesn't get used then it won't be included when the shader is compiled.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement