SFML community forums

Help => Window => Topic started by: mrchris on April 23, 2010, 11:18:59 pm

Title: Persisting OpenGL context across window recreation?
Post by: mrchris on April 23, 2010, 11:18:59 pm
Currently when I recreate a window to switch from windowed to fullscreen or the reverse, I lose all the loaded textures. I guess because the OpenGL context is deleted on window recreation. I am using SFML2, I see that I can create an sf::Context separate from a window but I do not see a way to then give it to a window, it seems a window always makes its own context on creation... I feel like the answer is staring me in the face. Is it possible to persist the OpenGL context while creating and destroying windows?
Title: Persisting OpenGL context across window recreation?
Post by: Laurent on April 24, 2010, 10:21:06 am
This never happens in SFML, there is always a valid context alive even when no window exists.

You probably have another problem with your textures.