Jump to content
  • Advertisement
Sign in to follow this  
The_Nerd

OpenGL SDL toggle fullscreen

This topic is 5474 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok. I successfully ported my OpenGL program to Windows except for one thing. SDL_WM_ToggleFullscreen only works under X11. I am trying to make Windows go fullscreen, but when I set the SDL_FULLSCREEN flag to SDL_SetVideoMode and call it again, all my textures for OpenGL are gone and everything is white... Is this why all comercial games reload everything after you change a little thing and do I need to reload all my textures again also?

Share this post


Link to post
Share on other sites
Advertisement
The way to do it is destroy all the textures, change resolutions, reload all the textures. Other things such as VBO have to be recreated too, I think.

Share this post


Link to post
Share on other sites
yes all vertex/pixel programs have to be loaded as well, not to difficult, eg in your texture manager include the filename as well thus u can reload all textures again if the resolution changes

Share this post


Link to post
Share on other sites
Textures are lost like display lists and shader/program-objects because the Open GL Context is destroyed as the Window closes. At least it _should_ be like that. Under X11 you can use glXCopyContext to _save_ the GL States. Although I can't name it, there is a similar function under Windows.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!