[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Incremental Redisplay (Animation)
Date: Thu, 6 Dec 1990 17:44 EST
From: miller@SOL.CS.ROCHESTER.EDU (Brad Miller)
OK, I'm finally trying to figure out how to do this, and if this is going to
be easier with CLIM, let me know that and I'll wait :-).
Basically here's the problem. I'm using define-program-framework. I have a
number of objects, each of which has a graphical presentation. One of the
slots on the objects specifies the position it should be drawn at. This
position may change.
1) how do I invoke an incremental redisplay within a command (to show more
smooth movement, and more frequent updates than waiting for returning from
the command will do.. these commands take 5 minutes or more each).
2) The display is basically on 3 levels - a background that doesn't change,
an intermediate level that changes slightly periodically, and a foreground
that moves all over the place (for the curious, the former are tracks and
buildings, the medium are switch flags and other features that move and the
foreground are trains that run on the tracks). How can I get incremental
redisplay to update (redraw) the background when the foreground object moves
off of them? Somehow I may be able to get access to the bounding box of the
object that is moving, but how is it supposed to know what objects it no
longer is blocking?
Right now I'm using non-incremental redisplay which "works", but it's slow,
and flickers in a very serious way, obviously.
Incremental redisplay is not appropriate for animations. Use
1dw:erase-displayed-presentation0 and 1dw:redraw-displayed-presentation0 to
do your redisplay manually. Incremental redisplay is more appropriate
when it is difficult to determine exactly what changed in any given
period of time.
The answer is the same for CLIM, except that the functions are called
1clim:erase-output-record0 and 1clim:replay0.