The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
What happens when opengl context is lost, how to restore it
ShiroAisu


Joined: 09 Jun 2010
Posts: 42
I've recently found out that the OpenGL context is lost when we switch from full screen to windowed or vice versa (supposedly because we are creating a new window instead of using the previous one), but I also realize that I don't really know the implications of this. What exactly changes when OpenGL loses context? For instance, while using GLEW, I know that we can't initialize GLEW if we don't have a rendering context, does this mean that when we create a new one we have to initialize GLEW all over again?

And about the textures, if we have to reupload the textures to the graphics card again, won't the previous textures be occupying space as well? I mean, its not like they are freed, or should I free them before?

And what about the previous context, what happens to that?