1GLNEWLIST(3G) OpenGL Manual GLNEWLIST(3G)
2
3
4
6 glNewList - create or replace a display list
7
9 void glNewList(GLuint list, GLenum mode);
10
12 list
13 Specifies the display-list name.
14
15 mode
16 Specifies the compilation mode, which can be GL_COMPILE or
17 GL_COMPILE_AND_EXECUTE.
18
20 void glEndList(void);
21
23 Display lists are groups of GL commands that have been stored for
24 subsequent execution. Display lists are created with glNewList. All
25 subsequent commands are placed in the display list, in the order
26 issued, until glEndList() is called.
27
28 glNewList has two arguments. The first argument, list, is a positive
29 integer that becomes the unique name for the display list. Names can be
30 created and reserved with glGenLists() and tested for uniqueness with
31 glIsList(). The second argument, mode, is a symbolic constant that can
32 assume one of two values:
33
34 GL_COMPILE
35 Commands are merely compiled.
36
37 GL_COMPILE_AND_EXECUTE
38 Commands are executed as they are compiled into the display list.
39
40 Certain commands are not compiled into the display list but are
41 executed immediately, regardless of the display-list mode. These
42 commands are glAreTexturesResident(), glColorPointer(),
43 glDeleteLists(), glDeleteTextures(), glDisableClientState(),
44 glEdgeFlagPointer(), glEnableClientState(), glFeedbackBuffer(),
45 glFinish(), glFlush(), glGenLists(), glGenTextures(), glIndexPointer(),
46 glInterleavedArrays(), glIsEnabled(), glIsList(), glIsTexture(),
47 glNormalPointer(), glPopClientAttrib(), glPixelStore(),
48 glPushClientAttrib(), glReadPixels(), glRenderMode(), glSelectBuffer(),
49 glTexCoordPointer(), glVertexPointer(), and all of the glGet()
50 commands.
51
52 Similarly, glTexImage1D(), glTexImage2D(), and glTexImage3D() are
53 executed immediately and not compiled into the display list when their
54 first argument is GL_PROXY_TEXTURE_1D, GL_PROXY_TEXTURE_1D, or
55 GL_PROXY_TEXTURE_3D, respectively.
56
57 When the 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 GL_PROXY_COLOR_TABLE, GL_PROXY_POST_CONVOLUTION_COLOR_TABLE, or
61 GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE.
62
63 For OpenGL versions 1.3 and greater, or when the ARB_multitexture
64 extension is supported, glClientActiveTexture() is not compiled into
65 display lists, but executed immediately.
66
67 When glEndList() is encountered, the display-list definition is
68 completed by associating the list with the unique name list (specified
69 in the glNewList command). If a display list with name list already
70 exists, it is replaced only when glEndList() is called.
71
73 glCallList() and glCallLists() can be entered into display lists.
74 Commands in the display list or lists executed by glCallList() or
75 glCallLists() are not included in the display list being created, even
76 if the list creation 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
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
89 preceding 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
93 executed between the execution of glBegin() and the corresponding
94 execution of glEnd().
95
96 GL_OUT_OF_MEMORY is generated if there is insufficient memory to
97 compile the display list. If the GL version is 1.1 or greater, no
98 change is made to the previous contents of the display list, if any,
99 and no other change is made to the GL state. (It is as if no attempt
100 had been made to create the new display list.)
101
103 glIsList()
104
105 glGet() with argument GL_LIST_INDEX
106
107 glGet() with argument GL_LIST_MODE
108
110 glCallList(), glCallLists(), glDeleteLists(), glGenLists()
111
113 Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
114 under the SGI Free Software B License. For details, see
115 http://oss.sgi.com/projects/FreeB/.
116
118 opengl.org
119
120
121
122opengl.org 07/13/2018 GLNEWLIST(3G)