Next: 4.7.3 Feedback and Selection Up: 4.7 Miscellaneous Functions Previous: 4.7.1 Evaluators

4.7.2 Display Lists

A display list encapsulates a group of OpenGL commands so that they may be later issued (in the order originally specified) by simply naming the display list. This is accomplished by surrounding the commands to be encapsulated with glBeginList and glEndList. glBeginList takes an integer argument that is the numeric name of the display list.

Display lists may be redefined, but not edited. The lack of editing simplifies display list memory management in the OpenGL server, eliminating the performance penalty such management would incur. Display lists may, however, be nested (one display list may invoke another). An effect similar to display list editing may thus be obtained by: (1) building a list containing a number of subordinate lists; (2) redefining the subordinate lists.

A single display list is invoked with glCallList. glCallLists calls a series of display lists in succession. Arguments to glCallLists specify an array of integers that are added to a list base to form the series of display list numbers. glCallLists is useful to display a string of characters when the commands that generate each character have been encapsulated in their own display list. Section 6 gives an example using glCallLists.


segal@asd.sgi.com
Fri Sep 23 16:08:14 PDT 1994