Modern fullscreen toggling

Oldtimer
Posts: 834
Joined: 2002.09
Post: #1
A question that seems to come up every now and then, I know, but with Leopard here and Panther support getting axed everywhere I thought about new techniques for toggling into fullscreen.

Right now, I keep two contexts around, one for windowed and one for fullscreen rendering. I have a lingering-tingling memory that I went that route because I wanted Panther support; and that there was a way to toggle a single context in and out reliably on Tiger and up. Is this a figment of exam-induced imagination or is it possible? I've tried to peruse the Apple dev site but haven't come up with anything...
Quote this message in a reply
Member
Posts: 114
Joined: 2005.03
Post: #2
As far as I know the state of the art is to have a single context. When switching to/from fullscreen, create a new context that shares it's resources with the old one, then delete the old one. But, as always, it's better to wait until OSC replies before taking any action.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #3
If you're Leopard-only, there's a fantastic NSView method -enterFullScreenMode:options: you can use.

On (recent, anyway) Tigers it's fine to use a kCGLPFAFullScreen context with a windowed drawable, but you're still (as you are with the 10.3 solution) forced to pick a GPU and stay there, which isn't really desirable.

If you have working code for 10.3 and can't yet require Leopard, I see no reason to change what you're doing.
Quote this message in a reply
Oldtimer
Posts: 834
Joined: 2002.09
Post: #4
Cochrane: that's more elegant than what I'm doing right now, so thanks.
Keith: looking forward to 2009, then, when Tiger will be as dead as Panther.

Tho, using PFAFullscreen with a window would also be nicer than what I'm doing right now. The reason for reworking is that the code I'm having is astoundingly ugly and hard-worked, so I'm rewriting it ground-up and wanted to know what new and nice ways can be exploited. Thanks.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  NSGL fullscreen toggling unknown 6 3,578 Jan 18, 2006 06:42 PM
Last Post: unknown