View Full Version : GLUT fullscreen
Iceman
2002.06.18, 07:18 PM
How can I get GLUT fullscreen to work in Cocoa?
Thanks,
Iceman
Unregistered
2002.06.18, 08:12 PM
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.
OneSadCookie
2002.06.18, 10:27 PM
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).
Iceman
2002.06.19, 05:19 PM
Hmm would using NSOpenGLContext's - (void)setFullScreen; work better? Although I've heard there are some bugs, but it sounds better than GLUT.
Iceman
Feanor
2002.06.19, 05:27 PM
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 (homepage.mac.com/brentgulanowski)) 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
Iceman
2002.06.21, 04:33 PM
Thanks, that light box is really cool! :D
Iceman
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.