Display lists present a way to duplicate scene objects. They use a block structure such as the gl.Begin
and gl.End
function pairs. Almost every OpenGL call is stored into display list except those that manipulate with buffers and memory content. Display lists were intensively used and misused in the past to make scene rendering faster. However, they are now deprecated in relation to vertex buffers, which offer superior performance.
Before using the display list, you need to generate the display list object with the gl.GenLists(range)
function. This function accepts one argument that represents the number of continuous display lists to be generated. It returns an identifier of the first display list.
The included sample code will assume that the dl_id
variable contains a valid display list identifier.