iDevGames Forums
GLUT fullscreen - Printable Version

+- iDevGames Forums (
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: GLUT fullscreen (/thread-7698.html)

GLUT fullscreen - Iceman - Jun 18, 2002 03:18 PM

How can I get GLUT fullscreen to work in Cocoa?


GLUT fullscreen - Unregistered - Jun 18, 2002 04:12 PM


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.

GLUT fullscreen - OneSadCookie - Jun 18, 2002 06: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 (

GLUT fullscreen - Iceman - Jun 19, 2002 01: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.


GLUT fullscreen - Feanor - Jun 19, 2002 01: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) 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 ;-).


GLUT fullscreen - Iceman - Jun 21, 2002 12:33 PM

Thanks, that light box is really cool! Grin