SFML community forums
Help => Window => Topic started by: ZoserLock on December 11, 2012, 12:01:38 pm
-
Hi i have a little question,
When i change the resolution of the game the window is recreated and sfml somehow saves the objects from the previus contex( objects like textures, vbo) but the frame buffer objects are not saved.
i need to know if that is the espected behavior.
Thx
-
Nothing is supposed to be lost. Are you sure that they are really lost, it's not just a state that you forgot to reset?
-
Hi again,
first of all, thanks for the answer.
i checked the state and they are OK.
i checked the opengl Errors and gives "invalid operation" on glBindFramebuffer(GL_FRAMEBUFFER, mFrameBufferId);. It seems that the FBO ID becomes invalid after the change of the video mode.
also, i checked GDebugger and indeed... the FBOs of previous context still there.
so i don't have any more clues.
i dont know if you have another ideas. :(
note: im using SFML 2.0 only for the OpenGL window creation.
-
Although you say the states are OK, do you call window.resetGLStates()?
If you run some of your own OpenGL code you (sometimes) need to do that. ;)
Then again I don't really know anything about OpenGL...