• Advertisement
Sign in to follow this  

Somewhat weird problem with GL shader compiler

This topic is 3626 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement