Export (0) Print
Expand All

glCallList

The glCallList function executes a display list.

void glCallList(
  GLuint list
);

Parameters

list
The integer name of the display list to be executed.

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

  Windows NT/2000: Requires Windows NT 3.5 or later.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in Gl.h.
  Library: Use Opengl32.lib.

See Also

glBegin, glCallLists, glDeleteLists, glEnd, glGenLists, glGet, glIsList, glNewList, glPopAttrib, glPopMatrix, glPushAttrib, glPushMatrix


  

Community Additions

Show:
© 2014 Microsoft