Signature
Parameters
| Variables | Description | 
|---|---|
| list | 
     
                    Specifies the display-list name.
                 
 | 
                
| mode | 
     
                    Specifies the compilation mode,
                    which can be
    GL_COMPILE
    or
    GL_COMPILE_AND_EXECUTE
    .
 
 | 
                
Description
            Display lists are groups of GL commands that have been stored
            for subsequent execution.
            Display lists are created with
    glNewList
    .
            All subsequent 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:
    - GL_COMPILE
 - 
    Commands are merely compiled.
 - GL_COMPILE_AND_EXECUTE
 - 
    Commands are executed as they are compiled into the display list.
 
            Certain commands are not compiled into the display list
            but are executed 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
    ,
    glRenderMode
    ,
    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
    GL_PROXY_TEXTURE_1D
    ,
    GL_PROXY_TEXTURE_1D
    , or
    GL_PROXY_TEXTURE_3D
    , respectively.
    
            When the
    
    ARB_imaging
    extension is supported,
    glHistogram
    executes immediately when its argument is
    GL_PROXY_HISTOGRAM
    .  Similarly,
    glColorTable
    executes
            immediately when its first argument is
    GL_PROXY_COLOR_TABLE
    ,
    GL_PROXY_POST_CONVOLUTION_COLOR_TABLE
    , or
    GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE
    .
            For OpenGL versions 1.3 and greater, or when the
    
    
    ARB_multitexture
    extension is supported,
    glClientActiveTexture
    is not compiled into display lists, but
            executed immediately.
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 creation mode is
    GL_COMPILE_AND_EXECUTE
    .
    
            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
    GL_COMPILE
    mode, errors are
            not generated until the list is executed.
    Errors
    GL_INVALID_VALUE
    is generated if
    list
    is 0.
    
    GL_INVALID_ENUM
    is generated if
    mode
    is not an accepted value.
    
    GL_INVALID_OPERATION
    is generated if
    glEndList
    is called
            without a preceding
    glNewList
    ,
            or if
    glNewList
    is called while a display list is being defined.
    
    GL_INVALID_OPERATION
    is generated if
    glNewList
    or
    glEndList
    is executed between the execution of
    glBegin
    and the corresponding execution of
    glEnd
    .
    
    GL_OUT_OF_MEMORY
    is generated if there is insufficient memory to
            compile 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.)
    Associated Gets
    glGet
    with argument
    GL_LIST_INDEX
    
    glGet
    with argument
    GL_LIST_MODE
    See Also
Copyright
            Copyright
    
    1991-2006
            Silicon Graphics, Inc. This document is licensed under the SGI
            Free Software B License. For details, see
    http://oss.sgi.com/projects/FreeB/
    .
    Sample Code References
The following code samples have been found which appear to reference the functions described here. Take care that the code may be old, broken or not even use PyOpenGL.
glEndList
        
    {LGPL or GPL or MPL} Kamaelia
    Code/Python/Kamaelia/Kamaelia/Visualisation/PhysicsGraph3D/TopologyViewer3D.py
    Lines: 502
    {LGPL or GPL or MPL} Kamaelia
    Sketches/CL/Topology3D/THF/Kamaelia/UI/OpenGL/OpenGLComponent.py
    Lines: 390
    {LGPL or GPL or MPL} Kamaelia
    Sketches/MPS/BugReports/FixTests/Kamaelia/Kamaelia/Visualisation/PhysicsGraph3D/TopologyViewer3D.py
    Lines: 502
    {LGPL or GPL or MPL} Kamaelia
    Sketches/MPS/BugReports/FixTests/Kamaelia/Kamaelia/UI/OpenGL/OpenGLComponent.py
    Lines: 393
    {LGPL or GPL or MPL} Kamaelia
    Sketches/THF/Packages/Kamaelia/Community/THF/Kamaelia/UI/OpenGL/OpenGLComponent.py
    Lines: 390
        glNewList
        
    {LGPL or GPL or MPL} Kamaelia
    Code/Python/Kamaelia/Kamaelia/Visualisation/PhysicsGraph3D/TopologyViewer3D.py
    Lines: 500
    {LGPL or GPL or MPL} Kamaelia
    Sketches/CL/Topology3D/THF/Kamaelia/UI/OpenGL/OpenGLComponent.py
    Lines: 388
    {LGPL or GPL or MPL} Kamaelia
    Sketches/MPS/BugReports/FixTests/Kamaelia/Kamaelia/Visualisation/PhysicsGraph3D/TopologyViewer3D.py
    Lines: 500
    {LGPL or GPL or MPL} Kamaelia
    Sketches/MPS/BugReports/FixTests/Kamaelia/Kamaelia/UI/OpenGL/OpenGLComponent.py
    Lines: 391
    {LGPL or GPL or MPL} Kamaelia
    Sketches/THF/Packages/Kamaelia/Community/THF/Kamaelia/UI/OpenGL/OpenGLComponent.py
    Lines: 388