[comp.sys.mac.programmer] Jerky Updates

MAYER-A@RICEVM1.BITNET (David Mayer) (11/02/90)

HELP!!

I am writing an application which simulates analog instrument panel
displays.  A dynamic quickdrawn pointer sweeps across static parts
of the display which is stored in a PICT resource.

As the pointer moves across static stuff in the window, it erases it.
I invalidate a region for updating and redraw the display in that
region every time the pointer is moved.  Trouble is that the pointer
is moving quite often so updates are needed very frequently.  Also, I
determined from trial and error that rather than recalculate a new
update region for each update, it is faster to store a region which
encompasses all areas of the display which could ever need updating
in a region and update that same region each update.

Everything was great until I decided to reduce the size of my
displays.  Before I changed the size of the displays (and the
associated update regions) updates were animation-smooth.  Now,
the displays are intolerably jerky.  I can clearly see the update
rectangles blinking each update.

I have not changed anything in the code except the size of the
rectangles that I store in the update region.  Is there some secret to
smooth updates that I need to know??

Any help would be appreciated.  Thanks.

David Mayer    (MAYER-A@RICEVM1  Bitnet)

MAYER-A@RICEVM1.BITNET (David Mayer) (11/02/90)

HELP!!

I am writing an application which simulates analog instrument panel
displays.  A dynamic quickdrawn pointer sweeps across static parts
of the display which is stored in a PICT resource.

As the pointer moves across static stuff in the window, it erases it.
I invalidate a region for updating and redraw the display in that
region every time the pointer is moved.  Trouble is that the pointer
is moving quite often so updates are needed very frequently.  Also, I
determined from trial and error that rather than recalculate a new
update region for each update, it is faster to store a region which
encompasses all areas of the display which could ever need updating
in a region and update that same region each update.

Everything was great until I decided to reduce the size of my
displays.  Before I changed the size of the displays (and the
associated update regions) updates were animation-smooth.  Now,
the displays are intolerably jerky.  I can clearly see the update
rectangles blinking each update.

I have not changed anything in the code except the size of the
rectangles that I store in the update region.  Is there some secret to
smooth updates that I need to know??

Any help would be appreciated.  Thanks.

David Mayer  (MAYER-A@RICEVM1  Bitnet)

mxmora@unix.SRI.COM (Matt Mora) (11/06/90)

In article <1774MAYER-A@RICEVM1> MAYER-A@RICEVM1.BITNET (David Mayer) writes:

>I have not changed anything in the code except the size of the
>rectangles that I store in the update region.  Is there some secret to
>smooth updates that I need to know??

You might want to try and set your rectangles sizes to some multiple
of 8,16, or 32. This might help speed things up because the processor
can move data around more efficently at even word boundries. 

Just a thought. If all else fails you can use offscreen buffers.


>Any help would be appreciated.  Thanks.
>
>David Mayer  (MAYER-A@RICEVM1  Bitnet)


-- 
___________________________________________________________
Matthew Mora                |   my Mac  Matt_Mora@sri.com
SRI International           |  my unix  mxmora@unix.sri.com
___________________________________________________________