Contents / Previous / Next


Animation

OpenGL applications usually behave in one of two ways:

In the repaint-on-demand model, the application can merely call GLAutoDrawable.display() manually at the end of the mouse or keyboard listener to cause repainting to be done.
Alternatively if the application knows the concrete type of the GLDrawable it can call repaint() to have the painting scheduled for a later time.

In the continuous-repaint model, the application typically has a main loop which is calling GLAutoDrawable.display() repeatedly,
or is using the Animator class, which does this internally.