[comp.sys.mac.programmer] choosing animation sync methods

rolf@sparc1 (Rolf Wilson) (04/22/91)

  The original standard way to prevent flicker was to wait for
TickCount() to increment before drawing. Of course, this does
not work on machines with monitors whose refresh rate does not
match the rate that TickCount() increments. Some code was
given in the Usenet Mac Programmer's Guide for setting up a
VBL task to tell you when the vertical blanking interval had
begun.

  My question is : how can I decide in advance which method to use?
Certainly, for known machines I can just look at the machine id, what
what about new ones?

  It should be possible to do a simple animation that won't flicker
no matter what machine you use, should it not?

--

Rolf Wilson   Illinois State Geological Survey   rolf@sparc1.isgs.uiuc.edu

jmunkki@hila.hut.fi (Juri Munkki) (04/23/91)

In article <1991Apr22.152757.23565@ux1.cso.uiuc.edu> rolf@sparc1 (Rolf Wilson) writes:
>  The original standard way to prevent flicker was to wait for
>TickCount() to increment before drawing. Of course, this does
>not work on machines with monitors whose refresh rate does not
>match the rate that TickCount() increments. Some code was
>given in the Usenet Mac Programmer's Guide for setting up a
>VBL task to tell you when the vertical blanking interval had
>begun.

>  My question is : how can I decide in advance which method to use?
>Certainly, for known machines I can just look at the machine id, what
>what about new ones?

Color QuickDraw machines can have refresh rates other than 60 Hz. I don't
know about third party displays for non-color QD machines, but I suppose
they do not support vertical blanking interrupts for external monitors.

For sample code in Think C, you can retrieve the Sega 3D files from
vega.hut.fi. The files are in pub/mac/finnish/sega3d/.
   ____________________________________________________________________________
  / Juri Munkki	    /  Helsinki University of Technology   /  Wind  / Project /
 / jmunkki@hut.fi  /  Computing Center Macintosh Support  /  Surf  /  STORM  /
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~