void StartAnimation( void );


The method starts animation mode for associated COpenGL object. In animation mode each COpenGL::DrawEnd method call initiates drawing of another frame by invalidating the objectís window area. This causes continuous drawing of one frame after another. The animation mode can be stopped by calling the StopAnimation method.

In animation mode, the GetFrameSpeed method is useful to retrieve information about how long took drawing of the previous frame. This information can be used for example to update position of moving (animated) objects or for another similar purposes.

Note that in animation mode the COpenGL object consumes probably all available CPU time. Even if painting has lower priorities than other messages (such as keystroke messages) you might need to put GetMessage or PeekMessage and DispatchMessage calls loop if you want to make sure that other process messages (especially painting messages for other windows) are processed first..

See Also

StopAnimation, IsAnimationStarted, GetFrameSpeed, SMovementInfo structure