Contents / Previous / Next


Display Lists

A display list is a group of OpenGL commands that have been stored for later execution. This is called retained mode.
When a display list is invoked, the commands in it are executed in the order in which they were issued. Most OpenGL commands can be either stored in a display list or issued in immediate mode, which causes them to be executed immediately. You can freely mix immediate-mode programming and display lists within a single program. The programming examples you have done so far were in immediate mode.

Display lists may improve performance since you can use them to store OpenGL commands for later execution. It is often a good idea to cache commands in a display list if you plan to redraw the same geometry multiple times, or if you have a set of state changes that need to be applied multiple times.

When running OpenGL programs remotely to another machine on the network, it is especially important to cache commands in a display list. In this case, the server is a different machine than the host. Since display lists are part of the server state and therefore reside on the server machine (on one machine: server=graphics card, client=CPU), you can reduce the cost of repeatedly transmitting that data over a network.