Re: Problem with CoreAnimation and OpenGL drawing from a safari plugin
Re: Problem with CoreAnimation and OpenGL drawing from a safari plugin
- Subject: Re: Problem with CoreAnimation and OpenGL drawing from a safari plugin
- From: David Duncan <email@hidden>
- Date: Thu, 22 Apr 2010 09:20:59 -0700
On Apr 22, 2010, at 4:46 AM, varaha murthy wrote:
> I have a Safari out of process plugin which draws some 3d content using CAOpenGLLayer provided by Sfari by overriding darwInCglContext().
> Inside darwInCglContext(), I draw content using opengl and call 'glFlush'(tried CGLFlushDrawable too) multiple times to generate a short-living custom animation.
Yes, this won't work because you are actually rendering to an offscreen. Even if you were rendering on-screen, it would have been likely that you would miss many if not most of the frames of your animation doing this.
Instead you use the timing information provided to you by -drawInCGLContext: to drive your animation. An exceptionally simple version of this is demonstrated in the CALayerEssentials sample's example CAOpenGLLayer.
--
David Duncan
Apple DTS Animation and Printing
_______________________________________________
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