Next: Suggestions for future changes/additions
Up: DisplayDevice
Previous: Virtual member functions
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:
- display->prepare3D()
- Set the stereo mode to the left eye, or just normal, using the command display->left() or display->normal()
- For each Displayable in the Scene, the prepare routine is called to make that object ready to be drawn.
- For each display list maintained by the Scene, the command display->render(displist) is called.
- If the display is in stereo, display->right() is called and the previous step repeated.
- display->update()
Drawing to a file instead of the screen is almost identical, with the following exceptions:
- At present, only non-stereo file rendering is supported.
- The routine Scene::(char *method, char *filename, DisplayDevice *display) is used instead of draw, since a specific filetype and filename must also be given.
Justin Gullingsrud
Tue Apr 6 09:26:48 CDT 1999