Somewhat weird problem with GL shader compiler

Started by
1 comment, last by goodperiodical 16 years, 2 months ago
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.
uniform vec3 LightPosition;//vertex header
int pnt = glGetUniformLocation(shaderProgram[0], "LightPosition");//source
Pretty straight forward I think.
Advertisement
What does the shader look like? If the variable doesn't get used then it won't be included when the shader is compiled.
Wow, I must have missed that. So every time I comment out my luminance color fragment adjustment, the compiler traces that back to the vertex shader and removes the uniform variable input. Thanks for the response.

This topic is closed to new replies.

Advertisement