GLNEWLIST(3G) GLNEWLIST(3G)
NAME
glNewList,, glEndList - create or replace a display list
C SPECIFICATION
void glNewList( GLuint list,
GLenum mode )
PARAMETERS
list Specifies the display-list name.
mode Specifies the compilation mode, which can be GLCOMPILE or
GLCOMPILEANDEXECUTE.
C SPECIFICATION
void glEndList( void )
DESCRIPTION
Display lists are groups of GL commands that have been stored for sub-
sequent execution. Display lists are created with glNewList. All sub-
sequent commands are placed in the display list, in the order issued,
until glEndList is called.
glNewList has two arguments. The first argument, 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 argument, mode, is a symbolic constant that can
assume one of two values:
GLCOMPILE Commands are merely compiled.
GLCOMPILEANDEXECUTE Commands are executed as they are com-
piled into the display list.
Certain commands are not compiled into the display list but are exe-
cuted immediately, regardless of the display-list mode. These commands
are glAreTexturesResident, glColorPointer, glDeleteLists,
glDeleteTextures, glDisableClientState, glEdgeFlagPointer,
glEnableClientState, glFeedbackBuffer, glFinish, glFlush, glGenLists,
glGenTextures, glIndexPointer, glInterleavedArrays, glIsEnabled,
glIsList, glIsTexture, glNormalPointer, glPopClientAttrib,
glPixelStore, glPushClientAttrib, glReadPixels, glRenderode,
glSelectBuffer, glTexCoordPointer, glVertexPointer, and all of the
glGet commands.
Similarly, glTexImage1D, glTexImage2D, and glTexImage3D are executed
immediately and not compiled into the display list when their first
argument is GLPROXYTEXTURE1D, GLPROXYTEXTURE1D, or
GLPROXYTEXTURE3D, respectively.
When the GLARBimaging extension is supported, glHistogram executes
immediately when its argument is GLPROXYHISTOGRAM. Similarly,
glColorTable executes immediately when its first argument is
glPROXYCOLORTABLE, glPROXYPOSTCONVOLUTIONCOLORTABLE, or
glPROXYPOSTCOLORMATRIXCOLORTABLE.
When the GLARBmultitexture extension is supported,
glClientActiveTextureARB is not compiled into display lists, but exe-
cuted immediately.
When glEndList 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.
NOTES
glCallList and glCallLists can be entered into display lists. 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 cre-
ation mode is GLCOMPILEANDEXECUTE.
A display list is just a group of commands and arguments, so errors
generated by commands in a display list must be generated when the list
is executed. If the list is created in GLCOMPILE mode, errors are not
generated until the list is executed.
ERORS
GLINVALIDVALUE is generated if list is 0.
GLINVALIDENUM is generated if mode is not an accepted value.
GLINVALIDOPERATION is generated if glEndList is called without a pre-
ceding glNewList, or if glNewList is called while a display list is
being defined.
GLINVALIDOPERATION is generated if glNewList or glEndList is executed
between the execution of glBegin and the corresponding execution of
glEnd.
GLOUTOFMEMORY is generated if there is insufficient memory to com-
pile the display list. If the GL version is 1.1 or greater, no change
is made to the previous contents of the display list, if any, and no
other change is made to the GL state. (It is as if no attempt had been
made to create the new display list.)
ASOCIATED GETS
glIsList
glGet with argument GLISTINDEX
glGet with argument GLISTMODE
SEE ALSO
glCallList, glCallLists, glDeleteLists, glGenLists
GLNEWLIST(3G)
|