[ Previous | Next | Contents | Glossary | Home | Search ]
GL3.2 Version 4.1 for AIX: Programming Concepts

Chapter 10. Working with Objects (Display Lists)

This section discusses the following topics on defining, using, and modifying objects in GL:

It is sometimes convenient to group a sequence of drawing routines and give it an identifier. The entire sequence can then be repeated with a single reference to the identifier rather than by repeating all the drawing routines. In GL, such sequences are called graphical objects; on other systems they are sometimes known as display lists.

A graphical object is a list of graphics primitives (drawing routines) to display. For example, a drawing of an automobile can be viewed as a compilation of smaller drawings of each of its parts: windows, doors, wheels, and so forth. Each part might be a graphical object: a series of calls to the move, draw, and pdr subroutines.

To make the automobile a graphical object, first create objects that draw its parts, such as a wheel object, a door object, and a body object. The automobile object is a series of calls to the part objects, which together with appropriate rotation, translation, and scale routines, puts all the parts in their correct places.

[ Previous | Next | Contents | Glossary | Home | Search ]