In the wiki on uniforms, it is said:
This would imply that *sometimes* they may in fact be the same?OpenGL does not guarantee that the same uniforms in the two programs will have the same location.
I ask because I have two shaders but they have same-name uniforms. I had previously assumed that when I switch between shaders, the uniform data will be the same as the uniform data during that shader's last use.
But this appears to not be correct. Instead, I have to reset a uniform when I switch to the shader, even if I had used the same shader seconds before without difficulty.
Is it normal to reset all the uniforms when you change to a new shader?