How do I use CGDisplayCapture() to capture an NSOpenGLView in a XIB?
How do I use CGDisplayCapture() to capture an NSOpenGLView in a XIB?
- Subject: How do I use CGDisplayCapture() to capture an NSOpenGLView in a XIB?
- From: Clay Heaton <email@hidden>
- Date: Tue, 22 Jan 2013 10:50:35 -0500
OS X / Cocoa question:
I have a subclass of NSOpenGLView in a XIB (working with cocos2d). I want to capture the screen to disable the function keys, process switching, etc. while the app is running.
Given that I have an IBOutlet to the NSOpenGLView, how do I capture the screen in the App Delegate's -(void) applicationDidFinishLaunching: method?
I've read through the Apple display capturing guide, yet I always end up with a black screen (instead of the proper contents of my NSOpenGLView) when I try to capture the display. I suspect that I'm not assigning the proper context when using CGDisplayCapture(), but I'm getting confused with contexts and can't figure out what's gone awry.
For reference, here's the link to Apple's guide:
https://developer.apple.com/library/mac/#documentation/graphicsimaging/Conceptual/QuartzDisplayServicesConceptual/Articles/DisplayCapture.html
Thanks for any help,
Clay
_______________________________________________
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