next up previous contents
Next: Suggestions for future changes/additions Up: DisplayDevice Previous: Virtual member functions

Method of use

Once a DisplayDevice has been defined, and an instance created, a simple sequence of routines are used to have the device render a scene. This sequence is implemented by the Scene::(DisplayDevice *display) routine. A Scene object maintains a list of display lists and Displayable objects which create those lists (see section 6.3.7). The draw routine uses the DisplayDevice as follows:

  1. display->prepare3D()
  2. Set the stereo mode to the left eye, or just normal, using the command display->left() or display->normal()
  3. For each Displayable in the Scene, the prepare routine is called to make that object ready to be drawn.
  4. For each display list maintained by the Scene, the command display->render(displist) is called.
  5. If the display is in stereo, display->right() is called and the previous step repeated.
  6. display->update()

Drawing to a file instead of the screen is almost identical, with the following exceptions:



Justin Gullingsrud
Tue Apr 6 09:26:48 CDT 1999