| 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN" |
| 3 | "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd"> |
| 4 | <refentry id="glPrioritizeTextures"> |
| 5 | <refmeta> |
| 6 | <refmetainfo> |
| 7 | <copyright> |
| 8 | <year>1991-2006</year> |
| 9 | <holder>Silicon Graphics, Inc.</holder> |
| 10 | </copyright> |
| 11 | </refmetainfo> |
| 12 | <refentrytitle>glPrioritizeTextures</refentrytitle> |
| 13 | <manvolnum>3G</manvolnum> |
| 14 | </refmeta> |
| 15 | <refnamediv> |
| 16 | <refname>glPrioritizeTextures</refname> |
| 17 | <refpurpose>set texture residence priority</refpurpose> |
| 18 | </refnamediv> |
| 19 | <refsynopsisdiv><title>C Specification</title> |
| 20 | <funcsynopsis> |
| 21 | <funcprototype> |
| 22 | <funcdef>void <function>glPrioritizeTextures</function></funcdef> |
| 23 | <paramdef>GLsizei <parameter>n</parameter></paramdef> |
| 24 | <paramdef>const GLuint * <parameter>textures</parameter></paramdef> |
| 25 | <paramdef>const GLclampf * <parameter>priorities</parameter></paramdef> |
| 26 | </funcprototype> |
| 27 | </funcsynopsis> |
| 28 | </refsynopsisdiv> |
| 29 | <refsect1 id="parameters"><title>Parameters</title> |
| 30 | <variablelist> |
| 31 | <varlistentry> |
| 32 | <term><parameter>n</parameter></term> |
| 33 | <listitem> |
| 34 | <para> |
| 35 | Specifies the number of textures to be prioritized. |
| 36 | </para> |
| 37 | </listitem> |
| 38 | </varlistentry> |
| 39 | <varlistentry> |
| 40 | <term><parameter>textures</parameter></term> |
| 41 | <listitem> |
| 42 | <para> |
| 43 | Specifies an array containing the names of the textures to be prioritized. |
| 44 | </para> |
| 45 | </listitem> |
| 46 | </varlistentry> |
| 47 | <varlistentry> |
| 48 | <term><parameter>priorities</parameter></term> |
| 49 | <listitem> |
| 50 | <para> |
| 51 | Specifies an array containing the texture priorities. |
| 52 | A priority given in an element of <parameter>priorities</parameter> applies to the texture |
| 53 | named by the corresponding element of <parameter>textures</parameter>. |
| 54 | </para> |
| 55 | </listitem> |
| 56 | </varlistentry> |
| 57 | </variablelist> |
| 58 | </refsect1> |
| 59 | <refsect1 id="description"><title>Description</title> |
| 60 | <para> |
| 61 | <function>glPrioritizeTextures</function> assigns the <parameter>n</parameter> texture priorities given in <parameter>priorities</parameter> to the |
| 62 | <parameter>n</parameter> textures named in <parameter>textures</parameter>. |
| 63 | </para> |
| 64 | <para> |
| 65 | The GL establishes |
| 66 | a ``working set'' of textures that are resident in texture memory. |
| 67 | These textures may be bound to a texture target much more efficiently |
| 68 | than textures that are not resident. |
| 69 | By specifying a priority for each texture, |
| 70 | <function>glPrioritizeTextures</function> allows applications to guide the GL implementation in determining |
| 71 | which textures should be resident. |
| 72 | </para> |
| 73 | <para> |
| 74 | The priorities given in <parameter>priorities</parameter> are clamped to the range |
| 75 | <inlineequation><mml:math> |
| 76 | <!-- eqn: [0,1]:--> |
| 77 | <mml:mfenced open="[" close="]"> |
| 78 | <mml:mn>0</mml:mn> |
| 79 | <mml:mn>1</mml:mn> |
| 80 | </mml:mfenced> |
| 81 | </mml:math></inlineequation> |
| 82 | before they are assigned. |
| 83 | 0 indicates the lowest priority; textures with priority 0 |
| 84 | are least likely to be resident. |
| 85 | 1 indicates the highest priority; textures with priority 1 |
| 86 | are most likely to be resident. |
| 87 | However, textures are not guaranteed to be resident until they are used. |
| 88 | </para> |
| 89 | <para> |
| 90 | <function>glPrioritizeTextures</function> silently ignores attempts to prioritize texture 0 or any texture |
| 91 | name that does not correspond to an existing texture. |
| 92 | </para> |
| 93 | <para> |
| 94 | <function>glPrioritizeTextures</function> does not require that any of the textures named by <parameter>textures</parameter> |
| 95 | be bound to a texture target. |
| 96 | <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry> may also be used to set a texture's priority, |
| 97 | but only if the texture is currently bound. |
| 98 | This is the only way to set the priority of a default texture. |
| 99 | </para> |
| 100 | </refsect1> |
| 101 | <refsect1 id="notes"><title>Notes</title> |
| 102 | <para> |
| 103 | <function>glPrioritizeTextures</function> is available only if the GL version is 1.1 or greater. |
| 104 | </para> |
| 105 | </refsect1> |
| 106 | <refsect1 id="errors"><title>Errors</title> |
| 107 | <para> |
| 108 | <constant>GL_INVALID_VALUE</constant> is generated if <parameter>n</parameter> is negative. |
| 109 | </para> |
| 110 | <para> |
| 111 | <constant>GL_INVALID_OPERATION</constant> is generated if <function>glPrioritizeTextures</function> is executed |
| 112 | between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding |
| 113 | execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>. |
| 114 | </para> |
| 115 | </refsect1> |
| 116 | <refsect1 id="associatedgets"><title>Associated Gets</title> |
| 117 | <para> |
| 118 | <citerefentry><refentrytitle>glGetTexParameter</refentrytitle></citerefentry> with parameter name <constant>GL_TEXTURE_PRIORITY</constant> |
| 119 | retrieves the priority of a currently bound texture. |
| 120 | </para> |
| 121 | </refsect1> |
| 122 | <refsect1 id="seealso"><title>See Also</title> |
| 123 | <para> |
| 124 | <citerefentry><refentrytitle>glAreTexturesResident</refentrytitle></citerefentry>, |
| 125 | <citerefentry><refentrytitle>glBindTexture</refentrytitle></citerefentry>, |
| 126 | <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>, |
| 127 | <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>, |
| 128 | <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>, |
| 129 | <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>, |
| 130 | <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>, |
| 131 | <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry> |
| 132 | </para> |
| 133 | </refsect1> |
| 134 | <refsect1 id="Copyright"><title>Copyright</title> |
| 135 | <para> |
| 136 | Copyright <trademark class="copyright"></trademark> 1991-2006 |
| 137 | Silicon Graphics, Inc. This document is licensed under the SGI |
| 138 | Free Software B License. For details, see |
| 139 | <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>. |
| 140 | </para> |
| 141 | </refsect1> |
| 142 | </refentry> |