GLUT fullscreen

Member
Posts: 196
Joined: 2002.04
Post: #1
How can I get GLUT fullscreen to work in Cocoa?

Thanks,
Iceman
Quote this message in a reply
Unregistered
Unregistered
 
Post: #2
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.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #3
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).
Quote this message in a reply
Member
Posts: 196
Joined: 2002.04
Post: #4
Hmm would using NSOpenGLContext's - (void)setFullScreen; work better? Although I've heard there are some bugs, but it sounds better than GLUT.

Iceman
Quote this message in a reply
Feanor
Unregistered
 
Post: #5
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
Quote this message in a reply
Member
Posts: 196
Joined: 2002.04
Post: #6
Thanks, that light box is really cool! Grin

Iceman
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Newbie Quetsion: Fullscreen/Window Toggle Without GLUT geezusfreeek 11 5,834 Aug 4, 2002 10:43 AM
Last Post: Tobi