I was surprised to find that the only way to switch between fullscreen and windowed mode is by closing the window and reopening it in the new mode,
and since whenever the window is closed its OpenGL context is destroyed, I lose all my FBOs and VAOs.
For FBOs it's not a big deal since I have to remake them for the new window size anyway, but since I create VAO for every model whenever I load it, I would have to initialize all my meshes again, and that seems like a stupid thing to do just for switching the window mode.
Is there any other way to switch to fullscreen and back?
Is there a way to keep my VAOs when the window closes?
I'm talking about the sf::Window, not the sf::RenderWindow!