This function can be used when you mix SFML drawing and direct OpenGL rendering. Combined with PopGLStates, it ensures that:
SFML's internal states are not messed up by your OpenGL code
Your OpenGL states are not modified by a call to a SFML function
More specifically, it must be used around code that calls Draw functions.
Note that this function is quite expensive: it saves all the possible OpenGL states and matrices, even the ones you don't care about. Therefore it should be used wisely. It is provided for convenience, but the best results will be achieved if you handle OpenGL states yourself (because you know which states have really changed, and need to be saved and restored). Take a look at the ResetGLStates function if you do so.
public PushGLStates ( ) : void | ||
Résultat | void |