NSOpenGL Full Screen
NSOpenGL Full Screen
- Subject: NSOpenGL Full Screen
- From: Jeff LaMarche <email@hidden>
- Date: Sun, 20 Sep 2009 14:01:20 -0400
Okay, I'm feeling a little foolish. I've been so focused on iPhone
stuff for the last year and a half that I either didn't notice or just
plain forgot that NSView now has a method for displaying in full
screen mode. It certainly makes the whole process much easier.
I've updated the old NSOpenGL Full Screen sample code to use this
method.
http://innerloop.biz/code/OpenGL Full Screen.zip
This technique doesn't give you the zooming animation, but I'm not
sure how big of a deal that is. I was able to get the zooming working
by using a second window instance rather than trying to change the
style mask between borderless and regular, but I never fully resolved
the problem with the full screen view failing to receive key events
until it was clicked the first time, but I stopped trying to figure it
out once I realized there was an easier way.
Because the technique of placing the window above the menu bar was
specifically mentioned at a WWDC session, I've also created another
updated version of the OpenGL Full Screen sample code that uses that
technique to create a dedicated full-screen app (one that doesn't have
the option of windowed mode). You can find the code for that version
here:
http://innerloop.biz/code/OpenGL Dedicated Full Screen.zip
I've also updated the code to compile in 64-bit mode and to use
properties and synthesized instance variables. I've also got the
texture mapping properly.
As I said before, I'm a little rusty on Cocoa, so please don't
hesitate to point out improvements or problems.
Cheers
Jeff
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden