Lets say I have 2 shader programs, A & B, and do the following:
- Use program A
- Set uniforms for program A
- Render something
- Use program B
- Set uniforms for program B
- Render something else
If I now want to render something with program A again, do I need to re-set all the uniforms it uses, or will the uniforms be restored automatically? The GL ES 2.0 spec doesn’t mention it at all and the GL 2.0 spec only mentions that uniform values are stored as part of the program state (in section 2.15.5 - Required State).