• 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
Re: Need smooth animation suggestions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need smooth animation suggestions


  • Subject: Re: Need smooth animation suggestions
  • From: Shaun Wexler <email@hidden>
  • Date: Tue, 2 Mar 2004 15:23:11 -0800

On Mar 2, 2004, at 1:42 PM, Alex Eddy wrote:

On Mar 2, 2004, at 4:35 AM, Larry Wilson:
What is the recommended way to achieve smooth animation on Cocoa?

IMHO, "smooth" implies OpenGL.

I'm getting a bit of stutter in the drawing - particularly if I move another
application window (the animation momentarily stops or slows).

Are you running Panther on ATI hardware? This particular case has changed for the worse since Jaguar-- background timesharing applications are paused while you drag a window. Go ahead, try it. Fire up the iTunes visualizer or another continually animation application, then drag a Finder window around.

AFAIK, the only way around this is to promote your drawing to a realtime pthread. Like the Quicktime player.

I believe that may be due to an app (Finder, etc) disabling screen updates, so any app expecting the Window Manager to perform its swap will also have its updates deferred. If your view's surface isn't occluded (and thus requires compositing), OpenGL maps it's backing store directly to VRAM, which is a much lower level operation than the Window Server user process. It's not your app's threading, AFAIK.

MacFOH doesn't suffer from this problem, and it's a hardcore realtime audio-DSP/MIDI/control app, and gets full VBL refresh rate fps using OpenGL. Dragging other windows doesn't affect the screen updates at all under most circumstances; the genie-effect minimization briefly slows them from (VBL)75 fps to ~50 fps when it first begins to animate. Even the analyzer windows themselves fully animate while being minimzed/maximized with the genie! The drawing thread and the rendering threads (one per display) just use a normal fixed-priority round-robin scheduling policy (because they perform their own [unmentionable hack] VBL-sync), and none of the threads are promoted to time-constraint policy. I dunno what I did (right?), but it works! YMMV. ;)
--
Shaun Wexler
MacFOH
http://www.macfoh.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: Need smooth animation suggestions (From: Alex Eddy <email@hidden>)

  • Prev by Date: Dynamic cursor rectangles?
  • Next by Date: Re: Giving a NSToolbaritem a command key...?
  • Previous by thread: Re: Need smooth animation suggestions
  • Next by thread: Re: newbie - confused by copyWthZone
  • Index(es):
    • Date
    • Thread