1GLCALLLISTS(3G) GLCALLLISTS(3G)
2
3
4
6 glCallLists - execute a list of display lists
7
8
10 void glCallLists( GLsizei n,
11 GLenum type,
12 const GLvoid *lists )
13
14
16 n Specifies the number of display lists to be executed.
17
18 type Specifies the type of values in lists. Symbolic constants
19 GL_BYTE, GL_UNSIGNED_BYTE, GL_SHORT, GL_UNSIGNED_SHORT, GL_INT,
20 GL_UNSIGNED_INT, GL_FLOAT, GL_2_BYTES, GL_3_BYTES, and
21 GL_4_BYTES are accepted.
22
23 lists Specifies the address of an array of name offsets in the display
24 list. The pointer type is void because the offsets can be
25 bytes, shorts, ints, or floats, depending on the value of type.
26
28 glCallLists causes each display list in the list of names passed as
29 lists to be executed. As a result, the commands saved in each display
30 list are executed in order, just as if they were called without using a
31 display list. Names of display lists that have not been defined are
32 ignored.
33
34 glCallLists provides an efficient means for executing more than one
35 display list. type allows lists with various name formats to be
36 accepted. The formats are as follows:
37
38 GL_BYTE lists is treated as an array of signed bytes,
39 each in the range -128 through 127.
40
41 GL_UNSIGNED_BYTE lists is treated as an array of unsigned
42 bytes, each in the range 0 through 255.
43
44 GL_SHORT lists is treated as an array of signed two-
45 byte integers, each in the range -32768
46 through 32767.
47
48 GL_UNSIGNED_SHORT lists is treated as an array of unsigned two-
49 byte integers, each in the range 0 through
50 65535.
51
52 GL_INT lists is treated as an array of signed four-
53 byte integers.
54
55 GL_UNSIGNED_INT lists is treated as an array of unsigned four-
56 byte integers.
57
58 GL_FLOAT lists is treated as an array of four-byte
59 floating-point values.
60
61 GL_2_BYTES lists is treated as an array of unsigned
62 bytes. Each pair of bytes specifies a single
63 display-list name. The value of the pair is
64 computed as 256 times the unsigned value of
65 the first byte plus the unsigned value of the
66 second byte.
67
68 GL_3_BYTES lists is treated as an array of unsigned
69 bytes. Each triplet of bytes specifies a sin‐
70 gle display-list name. The value of the
71 triplet is computed as 65536 times the
72 unsigned value of the first byte, plus 256
73 times the unsigned value of the second byte,
74 plus the unsigned value of the third byte.
75
76 GL_4_BYTES lists is treated as an array of unsigned
77 bytes. Each quadruplet of bytes specifies a
78 single display-list name. The value of the
79 quadruplet is computed as 16777216 times the
80 unsigned value of the first byte, plus 65536
81 times the unsigned value of the second byte,
82 plus 256 times the unsigned value of the third
83 byte, plus the unsigned value of the fourth
84 byte.
85
86 The list of display-list names is not null-terminated. Rather, n spec‐
87 ifies how many names are to be taken from lists.
88
89 An additional level of indirection is made available with the
90 glListBase command, which specifies an unsigned offset that is added to
91 each display-list name specified in lists before that display list is
92 executed.
93
94 glCallLists can appear inside a display list. To avoid the possibility
95 of infinite recursion resulting from display lists calling one another,
96 a limit is placed on the nesting level of display lists during display-
97 list execution. This limit must be at least 64, and it depends on the
98 implementation.
99
100 GL state is not saved and restored across a call to glCallLists. Thus,
101 changes made to GL state during the execution of the display lists
102 remain after execution is completed. Use glPushAttrib, glPopAttrib,
103 glPushMatrix, and glPopMatrix to preserve GL state across glCallLists
104 calls.
105
107 Display lists can be executed between a call to glBegin and the corre‐
108 sponding call to glEnd, as long as the display list includes only com‐
109 mands that are allowed in this interval.
110
112 GL_INVALID_VALUE is generated if n is negative.
113
114 GL_INVALID_ENUM is generated if type is not one of GL_BYTE,
115 GL_UNSIGNED_BYTE, GL_SHORT, GL_UNSIGNED_SHORT, GL_INT, GL_UNSIGNED_INT,
116 GL_FLOAT, GL_2_BYTES, GL_3_BYTES, GL_4_BYTES.
117
119 glGet with argument GL_LIST_BASE
120 glGet with argument GL_MAX_LIST_NESTING
121 glIsList
122
124 glCallList(3G), glDeleteLists(3G), glGenLists(3G), glListBase(3G),
125 glNewList(3G), glPushAttrib(3G),
126 glPushMatrix(3G)
127
128
129
130 GLCALLLISTS(3G)