The OS supports switching the display between two different chunks of video
memory using the WinScreenLock and WinScreenUnlock APIs. This API isn't
supported by all devices. Also, the only way that this API can really be
used for double buffering is to have the OS copy the entire screen every
time. This is too slow to be useful for game animation. This API wasn't
designed for double buffering, so it isn't actually surprising that it
doesn't work out. The important thing is to understand the limitations of
this API so you don't get fooled into thinking it can do something it really
can't.

So, the result is that you generate the next frame of the animation in an
off screen window and then copy the necessary portion of that window to the
screen, just as Tilo explained so well.

There is another way that's based on exclusive ORing to draw and then erase
the car. This can be made to work with a multicolor car on a white
background, but if the car overlaps anything, the resulting colors will be
all mixed up.
-- 
Peter Epstein

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to