Introduction

This sample demonstrates the concept of "display lists", which was introduced in OpenGL 1.1.

Display lists provide the fastest way to display static geometry (even faster than vertex buffer objects in some cases). On the other hand, geometry built into a display list cannot be modified after the fact.

Please note that display lists are not supported in OpenGL 3.1 or higher.

Controls

Press Esc or click the close button to exit.

Implementation

1. The OnLoad event handler builds the display lists. OpenGL commands placed within a GL.NewList()-GL.EndList() region are recorded into the display list. (Note that some OpenGL commands cannot be recorded - consult the OpenGL reference for more information).

2. The OnRenderFrame event handler uses GL.CallLists() to render the display lists. This command takes an array of valid display list ids and "replays" the commands recorded in each list.

3. The OnUnload event handler uses GL.DeleteLists() to clean up the display lists.