garrynewman / GWEN

Abandoned: GWEN - GUI Without Extravagant Nonsense.
MIT License
427 stars 102 forks source link

SFML2 sample: add pushGLStates/popGLStates around the GWEN display call #59

Open lonestarr opened 11 years ago

lonestarr commented 11 years ago

Hi, The SFML2 sample shows this to render Gwen:

App.clear();
pCanvas->RenderCanvas();
App.display();

It works as long as you don't render anything else than GWEN, otherwise the OpenGL states are screwed-up. It's ok with pushGLStates/popGLStates around the GWEN display call:

App.clear();
doRenderMy3DWorld();
App.pushGLStates();
pCanvas->RenderCanvas();
App.popGLStates();
App.display();

No big deal anyway.