Re: QuickTime Animation Rendering
Re: QuickTime Animation Rendering
- Subject: Re: QuickTime Animation Rendering
- From: Jean-Daniel Dupas <email@hidden>
- Date: Fri, 28 Aug 2009 09:32:04 +0200
Le 28 août 2009 à 03:31, Kevin Cathey a écrit :
(1) Is there a way for me to create the animations with
CoreAnimation Layers (CALayer and sublayers) and simply tell some
object to write to file? If so, how?
Yes, check out CARenderer. This will require some knowledge of
OpenGL to do it completely correctly. See rendering to a framebuffer:
http://developer.apple.com/documentation/graphicsimaging/Conceptual/OpenGL-MacProgGuide/opengl_offscreen/opengl_offscreen.html#//apple_ref/doc/uid/TP40001987-CH403-SW7
After creating and rendering to the framebuffer using CARenderer,
you can pull out the contents of the frame buffer and create a
CGImage from that. Make sure you get your alpha [pre]multiplication
correct.
Thank for the tips. I'm an other developer which want to render CA in
an OpenGL texture, and my main concern is more about using the very
poorly documented CARenderer than setting up OpenGL.
For example there is absolutely no doc about what the OpenGL Context
state should be (viewport, transform), and what state may be affected
by the rendering.
Do you know where we can find any sample code, short snippet, or
explanation about how it should be used ?
I managed to get some interesting result using the following sequence
but I have no idea if this is the correct way to do it:
– beginFrameAtTime:timeStamp
– addUpdateRect:
– render
– endFrame
Thanks.
_______________________________________________
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