SDL toggle fullscreen

Started by
3 comments, last by 666_1337 19 years, 7 months ago
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?
-- I waz here --
Advertisement
Same thing happened to me I guess the only thing to do is to reload your textures.
______________________________________________________________________________________With the flesh of a cow.
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.
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
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.
our new version has many new and good features. sadly, the good ones are not new and the new ones are not good

This topic is closed to new replies.

Advertisement