1GLNEWLIST(3G)                                                    GLNEWLIST(3G)
2
3
4

NAME

6       glNewList, glEndList - create or replace a display list
7
8

C SPECIFICATION

10       void glNewList( GLuint list,
11                       GLenum mode )
12
13

PARAMETERS

15       list  Specifies the display-list name.
16
17       mode  Specifies  the  compilation  mode,  which  can  be  GL_COMPILE or
18             GL_COMPILE_AND_EXECUTE.
19

C SPECIFICATION

21       void glEndList( void )
22
23

DESCRIPTION

25       Display lists are groups of GL commands that have been stored for  sub‐
26       sequent execution.  Display lists are created with glNewList.  All sub‐
27       sequent commands are placed in the display list, in the  order  issued,
28       until glEndList is called.
29
30       glNewList  has  two arguments.  The first argument, list, is a positive
31       integer that becomes the unique name for the display list.   Names  can
32       be  created and reserved with glGenLists and tested for uniqueness with
33       glIsList.  The second argument, mode, is a symbolic constant  that  can
34       assume one of two values:
35
36       GL_COMPILE                    Commands are merely compiled.
37
38       GL_COMPILE_AND_EXECUTE        Commands  are  executed  as they are com‐
39                                     piled into the display list.
40
41       Certain commands are not compiled into the display list  but  are  exe‐
42       cuted immediately, regardless of the display-list mode.  These commands
43       are     glAreTexturesResident,      glColorPointer,      glDeleteLists,
44       glDeleteTextures,        glDisableClientState,       glEdgeFlagPointer,
45       glEnableClientState, glFeedbackBuffer, glFinish,  glFlush,  glGenLists,
46       glGenTextures,    glIndexPointer,   glInterleavedArrays,   glIsEnabled,
47       glIsList,     glIsTexture,     glNormalPointer,      glPopClientAttrib,
48       glPixelStore,     glPushClientAttrib,    glReadPixels,    glRenderMode,
49       glSelectBuffer, glTexCoordPointer,  glVertexPointer,  and  all  of  the
50       glGet commands.
51
52       Similarly,  glTexImage1D,  glTexImage2D,  and glTexImage3D are executed
53       immediately and not compiled into the display  list  when  their  first
54       argument     is     GL_PROXY_TEXTURE_1D,     GL_PROXY_TEXTURE_1D,    or
55       GL_PROXY_TEXTURE_3D, respectively.
56
57       When the GL_ARB_imaging extension is  supported,  glHistogram  executes
58       immediately   when  its  argument  is  GL_PROXY_HISTOGRAM.   Similarly,
59       glColorTable  executes  immediately  when   its   first   argument   is
60       glPROXY_COLOR_TABLE,      glPROXY_POST_CONVOLUTION_COLOR_TABLE,      or
61       glPROXY_POST_COLOR_MATRIX_COLOR_TABLE.
62
63       When    the     GL_ARB_multitexture     extension     is     supported,
64       glClientActiveTextureARB  is  not compiled into display lists, but exe‐
65       cuted immediately.
66
67       When glEndList is encountered, the display-list definition is completed
68       by  associating  the  list  with the unique name list (specified in the
69       glNewList command).  If a display list with name list  already  exists,
70       it is replaced only when glEndList is called.
71

NOTES

73       glCallList and glCallLists can be entered into display lists.  Commands
74       in the display list or lists executed by glCallList or glCallLists  are
75       not  included  in the display list being created, even if the list cre‐
76       ation mode is GL_COMPILE_AND_EXECUTE.
77
78       A display list is just a group of commands  and  arguments,  so  errors
79       generated by commands in a display list must be generated when the list
80       is executed. If the list is created in GL_COMPILE mode, errors are  not
81       generated until the list is executed.
82

ERRORS

84       GL_INVALID_VALUE is generated if list is 0.
85
86       GL_INVALID_ENUM is generated if mode is not an accepted value.
87
88       GL_INVALID_OPERATION is generated if glEndList is called without a pre‐
89       ceding glNewList, or if glNewList is called while  a  display  list  is
90       being defined.
91
92       GL_INVALID_OPERATION is generated if glNewList or glEndList is executed
93       between the execution of glBegin and  the  corresponding  execution  of
94       glEnd.
95
96       GL_OUT_OF_MEMORY  is  generated if there is insufficient memory to com‐
97       pile the display list. If the GL version is 1.1 or greater,  no  change
98       is  made  to  the previous contents of the display list, if any, and no
99       other change is made to the GL state. (It is as if no attempt had  been
100       made to create the new display list.)
101

ASSOCIATED GETS

103       glIsList
104       glGet with argument GL_LIST_INDEX
105       glGet with argument GL_LIST_MODE
106

SEE ALSO

108       glCallList(3G), glCallLists(3G), glDeleteLists(3G), glGenLists(3G)
109
110
111
112                                                                 GLNEWLIST(3G)
Impressum