xenocara/doc/gl-docs/GL/gl/prioritizetextures.3gl
2006-11-29 17:00:35 +00:00

84 lines
2.9 KiB
Plaintext

'\" e
'\"! eqn | mmdoc
'\"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 prioritiz
.ds Xs 38862 5 prioritizetextures.gl
.TH GLPRIORITIZETEXTURES 3G
.SH NAME
.B "glPrioritizeTextures
\- set texture residence priority
.SH C SPECIFICATION
void \f3glPrioritizeTextures\fP(
GLsizei \fIn\fP,
.nf
.ta \w'\f3void \fPglPrioritizeTextures( 'u
const GLuint \fI*textures\fP,
const GLclampf \fI*priorities\fP )
.fi
.SH PARAMETERS
.TP \w'\fIpriorities\fP\ \ 'u
\f2n\fP
Specifies the number of textures to be prioritized.
.TP
\f2textures\fP
Specifies an array containing the names of the textures to be prioritized.
.TP
\f2priorities\fP
Specifies an array containing the texture priorities.
A priority given in an element of \f2priorities\fP applies to the texture
named by the corresponding element of \f2textures\fP.
.SH DESCRIPTION
\%\f3glPrioritizeTextures\fP assigns the \f2n\fP texture priorities given in \f2priorities\fP to the
\f2n\fP textures named in \f2textures\fP.
.P
The GL establishes
a ``working set'' of textures that are resident in texture memory.
These textures may be bound to a texture target much more efficiently
than textures that are not resident.
By specifying a priority for each texture,
\%\f3glPrioritizeTextures\fP allows applications to guide the GL implementation in determining
which textures should be resident.
.P
The priorities given in \f2priorities\fP are clamped to the range [0,\1]
before they are assigned.
0 indicates the lowest priority; textures with priority 0
are least likely to be resident.
1 indicates the highest priority; textures with priority 1
are most likely to be resident.
However, textures are not guaranteed to be resident until they are used.
.P
\%\f3glPrioritizeTextures\fP silently ignores attempts to prioritize texture 0, or any texture
name that does not correspond to an existing texture.
.P
\%\f3glPrioritizeTextures\fP does not require that any of the textures named by \f2textures\fP
be bound to a texture target.
\%\f3glTexParameter\fP may also be used to set a texture's priority,
but only if the texture is currently bound.
This is the only way to set the priority of a default texture.
.SH NOTES
\%\f3glPrioritizeTextures\fP is available only if the GL version is 1.1 or greater.
.SH ERRORS
\%\f3GL_INVALID_VALUE\fP is generated if \f2n\fP is negative.
.P
\%\f3GL_INVALID_OPERATION\fP is generated if \%\f3glPrioritizeTextures\fP is executed
between the execution of \%\f3glBegin\fP and the corresponding
execution of \%\f3glEnd\fP.
.SH ASSOCIATED GETS
\%\f3glGetTexParameter\fP with parameter name \%\f3GL_TEXTURE_PRIORITY\fP
retrieves the priority of a currently bound texture.
.SH SEE ALSO
\%\f3glAreTexturesResident(3G)\fP,
\%\f3glBindTexture(3G)\fP,
\%\f3glCopyTexImage1D(3G)\fP,
\%\f3glCopyTexImage2D(3G)\fP,
\%\f3glTexImage1D(3G)\fP,
\%\f3glTexImage2D(3G)\fP,
\%\f3glTexImage3D(3G)\fP,
\%\f3glTexParameter(3G)\fP