If I have an ARGB CVPixelBufferRef, what's the most efficient way to display it 
in a CALayer? 

The only officially supported formats for the CALayer.contents property are 
NSImage and CGImage, and both of those paths will end up copying the 
CVPixelBuffer's data on the CPU, and then upload the copy to the GPU. I'm 
trying to easily avoid that copy.

It seems my only choice is to create an CAOpenGLLayer, manually create a 
texture from CVPixelBuffer using the typical gl*() calls, and then draw in the 
layer's drawInCGLContext:::: method. 

Is there a simpler option?


--
Seth Willits




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to