glCallList function

The glCallList function executes a display list.

Syntax

void WINAPI glCallList(
   GLuint list
);

Parameters

list

The integer name of the display list to be executed.

Return value

This function does not return a value.

Remarks

Invoking the glCallList function begins execution of the named display list. The functions saved in the display list are executed in order, just as if you called them without using a display list. If list has not been defined as a display list, glCallList is ignored.

The glCallList function can appear inside a display list. To avoid the possibility of infinite recursion resulting from display lists calling one another, a limit is placed on the nesting level of display lists during display-list execution. This limit is at least 64, however, it depends on the implementation.

The OpenGL state is not saved and restored across a call to glCallList. Thus, changes made to the OpenGL state during the execution of a display list remain after execution of the display list is completed. To preserve the OpenGL state across glCallList calls, use glPushAttrib, glPopAttrib, glPushMatrix, and glPopMatrix.

You can execute display lists between a call to glBegin and the corresponding call to glEnd, as long as the display list includes only functions that are allowed in this interval.

The following functions retrieve information related to glCallList:

glGet with argument GL_MAX_LIST_NESTING

glIsList

Requirements

Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Header
Gl.h
Library
Opengl32.lib
DLL
Opengl32.dll

See also

glBegin

glCallLists

glDeleteLists

glEnd

glGenLists

glGet

glIsList

glNewList

glPopAttrib

glPopMatrix

glPushAttrib

glPushMatrix