Next: 5.5 Portability Up: 5 Comparing OpenGL to Previous: 5.3 Rendering Functionality

3.6 Display Lists

PEX and OpenGL both provide a means to store commands for later execution. In PEX (for implementations that support the structure or PHIGS workstation subsets), editable structures can be created and edited. A structure contains graphics primitives such as a polygon. Structures may also contain calls to execute other structures allowing them to be arranged in a hierarchical fashion. PHIGS supports structures so PEX does so too. Entire 3D models can be constructed out of a hierarchy of structures so that a redraw requires only retraversing the structure hierarchy.

OpenGL does not support structures in the same way PEX does. Instead display lists can be constructed which contain sequences of OpenGL commands. Like structures, a display list can contain a command to execute another display list, effectively allowing display lists to be combined into arbitrary networks. Unlike structures, OpenGL display lists are not editable. Once one is created, it is sealed and cannot be changed (except by destroy and recreating it). This write-only nature allows optimizations to be performed on display lists unavailable to structures. The commands in the display list can be optimized for faster execution.

Even though display lists cannot be edited, this should not be considered a disadvantage. The same effect as editing can be achieved by rewriting display lists called by other display lists.

Display lists and structures both minimize the amount of transfer overhead when running PEX or OpenGL over a network since the commands in a structure or display list can be executed repeatedly by only calling the display list by name. The commands themselves need to be transferred across the wire only once.


mjk@asd.sgi.com
Wed Oct 19 18:06:42 PDT 1994