I've searched around and can't seem to find an answer about this. I have a shader and in the shader I have a uniform variable. I have seen an issue where renaming a uniform can mean the difference between the shader working and not working.
I had the following and it did not work
Code :struct BoundaryStruct { float upper_bound; float lower_bound; int mask; }; uniform BoundaryStruct b_kComp;
I renamed my variable (and updated where the code uses said variable) to
and magically everything works now.Code :uniform BoundaryStruct t_kComp;
There were no compile errors or warnings, but when the application runs glGetError returns GL_INVALID_OPERATION after a call to glUniformMatrix4fv when I set my modelview matrix.
I've seen this issue several times now in developing my current code base where things weren't working, so I renamed some uniforms and update the application code accordingly and then everything works. While I do have a means to get around this it is a really annoying issue.
Does anyone have any ideas about this? Have I missed some important naming advisory memo?
Thanks,
Kris





