xenocara/doc/gl-docs/GL/gl/calllists.3gl

166 lines
5.0 KiB
Plaintext
Raw Normal View History

'\"macro stdmacro
.ds Vn Version 1.2
.ds Dt 24 September 1999
.ds Re Release 1.2.1
.ds Dp Jan 14 18:30
.ds Dm 01 calllists
.ds Xs 46352 7 calllists.gl
.TH GLCALLLISTS 3G
.SH NAME
.B "glCallLists
\- execute a list of display lists
.SH C SPECIFICATION
void \f3glCallLists\fP(
GLsizei \fIn\fP,
.nf
.ta \w'\f3void \fPglCallLists( 'u
GLenum \fItype\fP,
const GLvoid \fI*lists\fP )
.fi
.SH PARAMETERS
.TP \w'\fIlists\fP\ \ 'u
\f2n\fP
Specifies the number of display lists to be executed.
.TP
\f2type\fP
Specifies the type of values in \f2lists\fP.
Symbolic constants
\%\f3GL_BYTE\fP,
\%\f3GL_UNSIGNED_BYTE\fP,
\%\f3GL_SHORT\fP,
\%\f3GL_UNSIGNED_SHORT\fP,
\%\f3GL_INT\fP,
\%\f3GL_UNSIGNED_INT\fP,
\%\f3GL_FLOAT\fP,
\%\f3GL_2_BYTES\fP,
\%\f3GL_3_BYTES\fP, and
\%\f3GL_4_BYTES\fP are accepted.
.TP
\f2lists\fP
Specifies the address of an array of name offsets in the display list.
The pointer type is void because the offsets can be bytes,
shorts,
ints,
or floats,
depending on the value of \f2type\fP.
.SH DESCRIPTION
\%\f3glCallLists\fP causes each display list in the list of names passed as \f2lists\fP
to be executed.
As a result,
the commands saved in each display list are executed in order,
just as if they were called without using a display list.
Names of display lists that have not been defined are ignored.
.P
\%\f3glCallLists\fP provides an efficient means for executing more than one display list.
\f2type\fP allows lists with various name formats to be accepted.
The formats are as follows:
.TP 25
\%\f3GL_BYTE\fP
\f2lists\fP is treated as an array of signed bytes,
each in the range \-128 through 127.
.TP
\%\f3GL_UNSIGNED_BYTE\fP
\f2lists\fP is treated as an array of unsigned bytes,
each in the range 0 through 255.
.TP
\%\f3GL_SHORT\fP
\f2lists\fP is treated as an array of signed two-byte integers,
each in the range \-32768 through 32767.
.TP
\%\f3GL_UNSIGNED_SHORT\fP
\f2lists\fP is treated as an array of unsigned two-byte integers,
each in the range 0 through 65535.
.TP
\%\f3GL_INT\fP
\f2lists\fP is treated as an array of signed four-byte integers.
.TP
\%\f3GL_UNSIGNED_INT\fP
\f2lists\fP is treated as an array of unsigned four-byte integers.
.TP
\%\f3GL_FLOAT\fP
\f2lists\fP is treated as an array of four-byte floating-point values.
.TP
\%\f3GL_2_BYTES\fP
\f2lists\fP is treated as an array of unsigned bytes.
Each pair of bytes specifies a single display-list name.
The value of the pair is computed as 256 times the unsigned value
of the first byte plus the unsigned value of the second byte.
.TP
\%\f3GL_3_BYTES\fP
\f2lists\fP is treated as an array of unsigned bytes.
Each triplet of bytes specifies a single display-list name.
The value of the triplet is computed as 65536 times the unsigned value
of the first byte,
plus 256 times the unsigned value of the second byte,
plus the unsigned value of the third byte.
.TP
\%\f3GL_4_BYTES\fP
\f2lists\fP is treated as an array of unsigned bytes.
Each quadruplet of bytes specifies a single display-list name.
The value of the quadruplet is computed as 16777216 times the unsigned value
of the first byte,
plus 65536 times the unsigned value of the second byte,
plus 256 times the unsigned value of the third byte,
plus the unsigned value of the fourth byte.
.P
The list of display-list names is not null-terminated.
Rather,
\f2n\fP specifies how many names are to be taken from \f2lists\fP.
.P
An additional level of indirection is made available with the
\%\f3glListBase\fP command,
which specifies an unsigned offset that is added to each display-list
name specified in \f2lists\fP before that display list is executed.
.P
\%\f3glCallLists\fP can appear inside a display list.
To avoid the possibility of infinite recursion resulting from display lists
calling one another,
a limit is placed on the nesting level of display
lists during display-list execution.
This limit must be at least 64, and it depends on the implementation.
.P
GL state is not saved and restored across a call to \%\f3glCallLists\fP.
Thus,
changes made to GL state during the execution of the display lists
remain after execution is completed.
Use \%\f3glPushAttrib\fP,
\%\f3glPopAttrib\fP,
\%\f3glPushMatrix\fP,
and \%\f3glPopMatrix\fP to preserve GL state across \%\f3glCallLists\fP calls.
.SH NOTES
Display lists can be executed between a call to \%\f3glBegin\fP
and the corresponding call to \%\f3glEnd\fP,
as long as the display list includes only commands that are allowed
in this interval.
.SH ERRORS
\%\f3GL_INVALID_VALUE\fP is generated if \f2n\fP is negative.
.P
\%\f3GL_INVALID_ENUM\fP is generated if \f2type\fP is not one of
\%\f3GL_BYTE\fP,
\%\f3GL_UNSIGNED_BYTE\fP,
\%\f3GL_SHORT\fP,
\%\f3GL_UNSIGNED_SHORT\fP,
\%\f3GL_INT\fP,
\%\f3GL_UNSIGNED_INT\fP,
\%\f3GL_FLOAT\fP,
\%\f3GL_2_BYTES\fP,
\%\f3GL_3_BYTES\fP,
\%\f3GL_4_BYTES\fP.
.SH ASSOCIATED GETS
\%\f3glGet\fP with argument \%\f3GL_LIST_BASE\fP
.br
\%\f3glGet\fP with argument \%\f3GL_MAX_LIST_NESTING\fP
.br
\%\f3glIsList\fP
.SH SEE ALSO
\%\f3glCallList(3G)\fP,
\%\f3glDeleteLists(3G)\fP,
\%\f3glGenLists(3G)\fP,
\%\f3glListBase(3G)\fP,
\%\f3glNewList(3G)\fP,
\%\f3glPushAttrib(3G)\fP,
.br
\%\f3glPushMatrix(3G)\fP