Mac OS X. Switching between fullscreen and windowed mode.
I have a project in the works with OpenGL and SDL.
User can resize the window either fullscreen/windowed mode using option.
I use SDL_SetVideoMode to set up the window, but this solution destory the original SDL_Surface context (so all my OpenGL textures get cleaned too).
How can I correctly switches between fullscreen and windowed mode without textures cleaning?
User can resize the window either fullscreen/windowed mode using option.
I use SDL_SetVideoMode to set up the window, but this solution destory the original SDL_Surface context (so all my OpenGL textures get cleaned too).
How can I correctly switches between fullscreen and windowed mode without textures cleaning?
You can't with SDL. Same problem as having a resizable window, SDL makes a new OpenGL context every time anything changes.
Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
You can write to Cocoa directly and use -[NSView enterFullScreenMode:withOptions:] and -[NSView exitFullScreenModeWithOptions] to toggle at will, but SDL doesn't support this.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| switching screen resolution | NelsonMandella | 3 | 2,903 |
Apr 25, 2010 01:33 PM Last Post: SethWillits |
|
| Full Screen Switching | Blacktiger | 3 | 3,003 |
Feb 9, 2008 03:05 PM Last Post: Blacktiger |
|
| Problems trying to fade in windowed mode | Wowbagger | 4 | 3,260 |
Aug 13, 2007 12:11 PM Last Post: Wowbagger |
|
| Tricks with dialog boxes in fullscreen mode causing permanent framerate drops. | Sea Manky | 2 | 2,640 |
Aug 7, 2007 06:20 AM Last Post: Sea Manky |
|
| opengl bitmap font question: switching to fullscreen | moon_magic | 2 | 2,600 |
Jul 8, 2006 03:39 PM Last Post: OneSadCookie |
|

