I thought we could maintain a copy of the OpenGL machine state (e.g. if tex units are enabled, or lights, or whatever), so unnecessary calls are avoided (we check if it’s already in the good state and if it isn’t we call the state change method).
What do you think of that ?