always there is written that state changes affect performance. My question is what counts as a state change. What about setting a state to the same value twice? Does the OpenGL implementation recognize this and simply does nothing?
I mean is it a good thing to track all states in the application to prevent redundant state changes or is this doing a lot of work than is already done by the driver?
Two objects share the same shader, color map but have different normal maps:
1. bind the program
2. bind "colormap" to TMU0
3. bind "normalmap0" to TMU1
4. render "object0"
(5. bind "colormap" to TMU0)
6. bind "normalmap0" to TMU1
4. render "object1"
Step 5 binds a texture map to a TMU that is already bound to it. Does this bring a huge performance hit or is this redundant change detected?