Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
glEndList
Collapse the table of content
Expand the table of content

glEndList function

The glNewList and glEndList functions create or replace a display list.

Syntax


void WINAPI glEndList(void);

Parameters

This function has no parameters.

Return value

This function does not return a value.

Error codes

The following error code can be retrieved by the glGetError function.

NameMeaning
GL_INVALID_OPERATION

glEndList was called without a preceding glNewList, or if glnewlist was called while a display list was being defined.

Error codes

The following error code can be retrieved by the glGetError function.

NameMeaning
GL_INVALID_OPERATION

glEndList was called without a preceding glNewList, or if glnewlist was called while a display list was being defined.

Remarks

Display lists are groups of OpenGL commands that have been stored for subsequent execution. The display lists are created with glNewList. All subsequent commands are placed in the display list, in the order issued, until glEndList is called.

The glNewList function has two parameters. The first parameter, list, is a positive integer that becomes the unique name for the display list. Names can be created and reserved with glGenLists and tested for uniqueness with glIsList. The second parameter, mode, is a symbolic constant that can assume one of the two preceding values.

Certain commands are not compiled into the display list, but are executed immediately, regardless of the display list mode. These commands are glColorPointer, glDeleteLists, glDisableClientState, glEdgeFlagPointer, glEnableClientState, glFeedbackBuffer, glFinish, glFlush, glGenLists, glIndexPointer, glInterleavedArrays, glIsEnabled, glIsList, glNormalPointer, glPopClientAttrib, glPixelStore, glPushClientAttrib, glReadPixels, glRenderMode, glSelectBuffer, glTexCoordPointer, glVertexPointer, and all of the glGet routines.

Similarly, glTexImage2D and glTexImage1D are executed immediately and not compiled into the display list when their first argument is GL_PROXY_TEXTURE_2D or GL_PROXY_TEXTURE_1D, respectively.

When the glEndList function is encountered, the display list definition is completed by associating the list with the unique name list (specified in the glNewList command). If a display list with name list already exists, it is replaced only when glEndList is called.

The glCallList and glCallLists functions can be entered into display lists. The commands in the display list or lists executed by glCallList or glCallLists are not included in the display list being created, even if the list creation mode is GL_COMPILE_AND_EXECUTE.

The following function retrieves information related to glNewList:

glGet with argument GL_MATRIX_MODE

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
glCallList
glCallLists
glDeleteLists
glEnd
glGenLists
glIsList
glNewList

 

 

Community Additions

ADD
Show:
© 2015 Microsoft