1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd">
2 <!-- saved from url=(0013)about:internet -->
3 <?xml-stylesheet type=
"text/xsl" href=
"mathml.xsl"?><html xmlns=
"http://www.w3.org/1999/xhtml" xmlns:
pref=
"http://www.w3.org/2002/Math/preference" pref:
renderer=
"mathplayer-dl"><head><meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8" /><title>glPrioritizeTextures
</title><meta name=
"generator" content=
"DocBook XSL Stylesheets V1.73.2" /></head><body><div class=
"refentry" lang=
"en" xml:
lang=
"en"><a id=
"glPrioritizeTextures"></a><div class=
"titlepage"></div><div class=
"refnamediv"><h2>Name
</h2><p>glPrioritizeTextures — set texture residence priority
</p></div><div class=
"refsynopsisdiv"><h2>C Specification
</h2><div class=
"funcsynopsis"><table border=
"0" summary=
"Function synopsis" cellspacing=
"0" cellpadding=
"0"><tr><td><code class=
"funcdef">void
<b class=
"fsfunc">glPrioritizeTextures
</b>(
</code></td><td>GLsizei
</td><td><var class=
"pdparam">n
</var>,
</td></tr><tr><td> </td><td>const GLuint *
</td><td><var class=
"pdparam">textures
</var>,
</td></tr><tr><td> </td><td>const GLclampf *
</td><td><var class=
"pdparam">priorities
</var><code>)
</code>;
</td></tr></table></div></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"parameters"></a><h2>Parameters
</h2><div class=
"variablelist"><dl><dt><span class=
"term"><em class=
"parameter"><code>n
</code></em></span></dt><dd><p>
4 Specifies the number of textures to be prioritized.
5 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>textures
</code></em></span></dt><dd><p>
6 Specifies an array containing the names of the textures to be prioritized.
7 </p></dd><dt><span class=
"term"><em class=
"parameter"><code>priorities
</code></em></span></dt><dd><p>
8 Specifies an array containing the texture priorities.
9 A priority given in an element of
<em class=
"parameter"><code>priorities
</code></em> applies to the texture
10 named by the corresponding element of
<em class=
"parameter"><code>textures
</code></em>.
11 </p></dd></dl></div></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"description"></a><h2>Description
</h2><p>
12 <code class=
"function">glPrioritizeTextures
</code> assigns the
<em class=
"parameter"><code>n
</code></em> texture priorities given in
<em class=
"parameter"><code>priorities
</code></em> to the
13 <em class=
"parameter"><code>n
</code></em> textures named in
<em class=
"parameter"><code>textures
</code></em>.
16 a ``working set'' of textures that are resident in texture memory.
17 These textures may be bound to a texture target much more efficiently
18 than textures that are not resident.
19 By specifying a priority for each texture,
20 <code class=
"function">glPrioritizeTextures
</code> allows applications to guide the GL implementation in determining
21 which textures should be resident.
23 The priorities given in
<em class=
"parameter"><code>priorities
</code></em> are clamped to the range
24 <mml:math xmlns:
mml=
"http://www.w3.org/1998/Math/MathML" overflow=
"scroll">
26 <mml:mfenced open=
"[" close=
"]">
31 before they are assigned.
32 0 indicates the lowest priority; textures with priority
0
33 are least likely to be resident.
34 1 indicates the highest priority; textures with priority
1
35 are most likely to be resident.
36 However, textures are not guaranteed to be resident until they are used.
38 <code class=
"function">glPrioritizeTextures
</code> silently ignores attempts to prioritize texture
0 or any texture
39 name that does not correspond to an existing texture.
41 <code class=
"function">glPrioritizeTextures
</code> does not require that any of the textures named by
<em class=
"parameter"><code>textures
</code></em>
42 be bound to a texture target.
43 <a class=
"citerefentry" href=
"glTexParameter.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexParameter
</span></span></a> may also be used to set a texture's priority,
44 but only if the texture is currently bound.
45 This is the only way to set the priority of a default texture.
46 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"notes"></a><h2>Notes
</h2><p>
47 <code class=
"function">glPrioritizeTextures
</code> is available only if the GL version is
1.1 or greater.
48 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"errors"></a><h2>Errors
</h2><p>
49 <code class=
"constant">GL_INVALID_VALUE
</code> is generated if
<em class=
"parameter"><code>n
</code></em> is negative.
51 <code class=
"constant">GL_INVALID_OPERATION
</code> is generated if
<code class=
"function">glPrioritizeTextures
</code> is executed
52 between the execution of
<a class=
"citerefentry" href=
"glBegin.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glBegin
</span></span></a> and the corresponding
53 execution of
<a class=
"citerefentry" href=
"glEnd.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glEnd
</span></span></a>.
54 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"associatedgets"></a><h2>Associated Gets
</h2><p>
55 <a class=
"citerefentry" href=
"glGetTexParameter.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glGetTexParameter
</span></span></a> with parameter name
<code class=
"constant">GL_TEXTURE_PRIORITY
</code>
56 retrieves the priority of a currently bound texture.
57 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"seealso"></a><h2>See Also
</h2><p>
58 <a class=
"citerefentry" href=
"glAreTexturesResident.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glAreTexturesResident
</span></span></a>,
59 <a class=
"citerefentry" href=
"glBindTexture.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glBindTexture
</span></span></a>,
60 <a class=
"citerefentry" href=
"glCopyTexImage1D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glCopyTexImage1D
</span></span></a>,
61 <a class=
"citerefentry" href=
"glCopyTexImage2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glCopyTexImage2D
</span></span></a>,
62 <a class=
"citerefentry" href=
"glTexImage1D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage1D
</span></span></a>,
63 <a class=
"citerefentry" href=
"glTexImage2D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage2D
</span></span></a>,
64 <a class=
"citerefentry" href=
"glTexImage3D.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexImage3D
</span></span></a>,
65 <a class=
"citerefentry" href=
"glTexParameter.xml"><span class=
"citerefentry"><span class=
"refentrytitle">glTexParameter
</span></span></a>
66 </p></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"Copyright"></a><h2>Copyright
</h2><p>
67 Copyright
<span class=
"trademark"></span>©
1991-
2006
68 Silicon Graphics, Inc. This document is licensed under the SGI
69 Free Software B License. For details, see
70 <a class=
"ulink" href=
"http://oss.sgi.com/projects/FreeB/" target=
"_top">http://oss.sgi.com/projects/FreeB/
</a>.
71 </p></div></div></body></html>