Could somebody give me an example how to use resetGLStates() function to mix direct OpenGL drawing with RenderTarget.draw() function without using pushGLStates() and popGLStates? Docs (http://www.sfml-dev.org/documentation/2.1/classsf_1_1RenderTarget.php#aac7504990d27dada4bfe3c7866920765) don't help :( Just a code snippet like that:
window.draw();
//magic
glRectf();
//magic
window.draw()
//magic
glRectf();
Well, I want to mix OpenGL draw functions and window.draw() function. Now I surround every OpenGL functions block with popGLStates() and pushGLStates():
window.draw();
popGLStates();
glRectf();
pushGLStates();
window.draw();
popGLStates();
glRectf();
pushGLStates();
window.draw();
but that doesn't work. What am I doing wrong?