• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Render an animation in a bitmap file (CARenderer)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Render an animation in a bitmap file (CARenderer)


  • Subject: Render an animation in a bitmap file (CARenderer)
  • From: Martin <email@hidden>
  • Date: Mon, 3 Mar 2008 00:16:16 +0100

Hi,

I'd like to render a CALayer animation in a series of bitmap files rather that in an NSView.

I've succeeded  in rendering 1 frame in a bitmap file by :
- creating a NSOpenGLContext
- creating a CARenderer (named renderer)
- calling the following code:

[renderer beginFrameAtTime:0.0 timeStamp:NULL];
[renderer addUpdateRect:CGRectMake(0.0, 0.0, _width, _height)];
[renderer render];
[renderer endFrame];

- saving the content of the context in a bitmap file

Now I'd like to do the same thing for each frame of an animation. But I have absolutely no idea on how to do this...
- at what point in the code should I add the animation to the layer?
- I've tried different values for the first argument of beginFrameAtTime:timeStamp:, but only the 1st frame is rendered?
- why does [renderer nextFrameTime] always return "inf"?


Thanks,
-Martin
_______________________________________________

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


  • Prev by Date: Re: Subclassing NSOutlineView causes failure of window to become main or key
  • Next by Date: Re: Problems with ScriptingBridge and iTunes
  • Previous by thread: Re: NSFontManager Initialization
  • Next by thread: Core Data opens files as empty
  • Index(es):
    • Date
    • Thread