If I use SDL_RESIZABLE together with OpenGL, after resizing the window, all my textures would disappear.
Is that normal? And if so, should I reload it again after resizing?
Printable View
If I use SDL_RESIZABLE together with OpenGL, after resizing the window, all my textures would disappear.
Is that normal? And if so, should I reload it again after resizing?
If the OpenGL context is lost, the textures and such will be lost. I don't know much about the SDL, but I suppose it's possible that it's dropping context when resizing for some reason. Which still seems like odd behavior to me, so it could be something else entirely too :p.
I seem to recall soething about having to acquire a new instance after resizing, but I could be wrong. I havent worked too much with OpenGL in years.
You have to call SDL_SetVideoMode() when you receive an SDL_VIDEORESIZE event. This is as true when you're not using OpenGL as when you are.
Just make sure you pass the new window size to SDL_SetVideoMode(), unless you want different behaviour for some reason. :)