Re: How do I use CGDisplayCapture() to capture an NSOpenGLView in a XIB?
Re: How do I use CGDisplayCapture() to capture an NSOpenGLView in a XIB?
- Subject: Re: How do I use CGDisplayCapture() to capture an NSOpenGLView in a XIB?
- From: Kyle Sluder <email@hidden>
- Date: Tue, 22 Jan 2013 08:00:27 -0800
On Tue, Jan 22, 2013, at 07:50 AM, Clay Heaton wrote:
>
> 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.
Don't capture the display. It's discouraged nowadays because it will
prevent the user from seeing important things like the "Your battery is
about to die" message. It also doesn't get you any net performance gain;
fullscreen OpenGL contexts have been deprecated for a couple OS releases
now.
Send -enterFullScreenMode:withPresentationOptions: to your OpenGL view.
You can pass a ton of arguments to it to disable the menu bar, app
switching, etc. If you want to render at a lower resolution than the
display, render to a texture of the appropriate size and then draw that
texture in a fullscreen quad.
--Kyle Sluder
_______________________________________________
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