Cocoa OpenGL - Switching to/from fullscreen

Indie Mac
Unregistered
 
Post: #1
Hi, I'm creating a basic Cocoa OpenGL shell so that I can plug in some small OpenGL PC games to port, to get a feel for some porting. I got a windowed OpenGL context (NSOpenGLView subclass) up and running fine (although I didn't implement the dock-minimizing... shame on me LOL ) At any rate, I am trying to implement fullscreen/windowed modes, and I'm not sure the correct way to go about doing this. I'm having problems using Core Graphics implementation for some reason. I was thinking about using the method described here:

http://zerobyzero.ca/~ktatters/tutorials/tutorial0.html

But I'm not sure if this is a proper way to go about doing this. What's the best way to do this?
Quote this message in a reply
Nibbie
Posts: 2
Joined: 2006.10
Moderator
Posts: 1,560
Joined: 2003.10
Post: #3
I'd recommend using the method described here:

http://onesadcookie.is-a-geek.net/Creati...ames.xhtml

[Edit: Damn, beat me to it!]

- Alex Diener
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #4
the original tutorial linked looks like it's missing a whole bunch of stuff required to make this work properly. My example should work everywhere, I hope Smile
Quote this message in a reply
Indie Mac
Unregistered
 
Post: #5
Thanks, this helps tremendously. OneSadCookie, I've seen your name around a lot (I think from the opengl.org forums?) Then I read your blog and read about your rant on OpenGL drivers on the Mac. Has things changed since then? I work for a company that may or may not be related to Macs that may or may not deal with games that may or may not test against certain OS's that may or may not include Tiger. Things break left and right Sad
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #6
Indie Mac Wrote:I work for a company that may or may not be related to Macs that may or may not deal with games that may or may not test against certain OS's that may or may not include Tiger. Things break left and right Sad

LOL

Basically, it seems that if you stick to the path well traveled, you should be OK. Obviously, Tiger ain't gonna be that yet, but in OpenGL terms Apple is eating a lot more of their own dog food in Tiger (CoreImage, Quartz 2D Extreme), so I'm hopeful in an abstract kind of way. The point of the betas though, is to make sure the bugs aren't in the release, so submit, submit, submit.

At this point, I still don't consider ARB_vertex_program, ARB_fragment_program, SGIS_generate_mipmap, PBuffers, and a few other more recent extensions, to be ready for prime-time. Basic OpenGL 1.1 functionality seems to have been working OK for a couple of OS revisions now though, and I'm hopeful that Doom III and the new Tiger tech will push at least those extensions above into full workingness in the near term.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Opengl/Cocoa text rendering tesil 15 16,819 Mar 20, 2012 11:16 AM
Last Post: OneSadCookie
  switching screen resolution NelsonMandella 3 3,337 Apr 25, 2010 01:33 PM
Last Post: SethWillits
  Mac OS X. Switching between fullscreen and windowed mode. e40pud 2 4,118 Jan 25, 2010 12:01 PM
Last Post: OneSadCookie
  SDL/OpenGL fullscreen text rendering StealthyCoin 2 6,362 Mar 26, 2009 09:47 AM
Last Post: StealthyCoin
  OpenGL Text Rendering (in Cocoa) daveh84 5 7,676 Feb 19, 2009 12:44 PM
Last Post: TomorrowPlusX