Next: 4 Debugging Tips Up: 3 Animation Via Work Previous: 3.1 Handling Iconification

3.2 Timeouts

X Toolkit timeouts are similar to work procedures, but instead of being activated whenever event dispatching is idle, they are called when a given period of time has expired. The XtAppAddTimeout and XtRemoveTimeOut routines can be used to add and remove X Toolkit timeouts.

OpenGL programmers may find timeouts useful to maintain animation at rates slower than ``as fast as OpenGL will render.'' Timeouts can be used to give animation a sustained frame rate. Timeouts can also be used to redraw a scene with higher detail when the user has stopped interacting with the program. For example, a 3D modeling program might redraw its model with lighting enabled and finer tessellation after the program has been idle for two seconds. Timeouts can also be used to trigger simple real-time state changes useful for visual simulation.


mjk@asd.sgi.com
Wed Oct 19 18:08:51 PDT 1994