GLUT fullscreen
How can I get GLUT fullscreen to work in Cocoa?
Thanks,
Iceman
Thanks,
Iceman
glutGameModeString("640x480:32");
glutEnterGameMode();
will get ya fullscreen, but be warned, MacOSX doesnt seem to change the screen resolution, so you will have to figure that out your self. CGDirectDisplay should do you for MacOSX only stuff.
glutEnterGameMode();
will get ya fullscreen, but be warned, MacOSX doesnt seem to change the screen resolution, so you will have to figure that out your self. CGDirectDisplay should do you for MacOSX only stuff.
Get Dietmar Planitzer's much-improved GLUT implementation, and use that. The GLUT that ships with MacOSX 10.1.x doesn't do game mode properly. This is a long-known bug that Apple refused to fix, but I believe Dietmar's version works properly.
You'll have to do a web search, or check the archives of the mac-opengl mailing list (http://lists.apple.com).
You'll have to do a web search, or check the archives of the mac-opengl mailing list (http://lists.apple.com).
Hmm would using NSOpenGLContext's - (void)setFullScreen; work better? Although I've heard there are some bugs, but it sounds better than GLUT.
Iceman
Iceman
It's possible. I'm led to believe that GLUT uses Cocoa's GL implementation. You could send a message [NSOpenGLContext currentContext] and then do your stuff. You will still have to capture the display, change the resolution etc. I've posted Cocoa OpenGL sample code on my idisk (FÎanor's iDisk) which switches between fullscreen and windowed mode (called "Light Box.pbproj") and also cut and pasted the specific code in the MacGameWiki (search for Core Graphics).
In other news, I had thought that Apple had updated their GLUT and fixed this. If you're very intrepid you can edit their GLUT yourself ;-).
FÎanor
In other news, I had thought that Apple had updated their GLUT and fixed this. If you're very intrepid you can edit their GLUT yourself ;-).
FÎanor
Thanks, that light box is really cool!
Iceman
Iceman
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Newbie Quetsion: Fullscreen/Window Toggle Without GLUT | geezusfreeek | 11 | 5,317 |
Aug 4, 2002 10:43 AM Last Post: Tobi |
|

