views:

213

answers:

1

I have a project in the works with OpenGL and SDL. Users have the option of using a full-screen or windowed mode for the display.

I use SDL_SetVideoMode to set up the window, but this solution destroys the original SDL_Surface context (so all my OpenGL textures get cleaned too).

How can I correctly switch between full-screen and windowed mode without textures cleaning?

+1  A: 

You need to reload all your textures unfortunately. This is neccesary because SDL recreates the context. It's an SDL issue that is planned to be fixed someday.

More info here.

Kornel Kisielewicz