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=
"glAreTexturesResident">
9 <holder>Silicon Graphics, Inc.
</holder>
12 <refentrytitle>glAreTexturesResident
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glAreTexturesResident
</refname>
17 <refpurpose>determine if textures are loaded in texture memory
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>GLboolean
<function>glAreTexturesResident
</function></funcdef>
23 <paramdef>GLsizei
<parameter>n
</parameter></paramdef>
24 <paramdef>const GLuint *
<parameter>textures
</parameter></paramdef>
25 <paramdef>GLboolean *
<parameter>residences
</parameter></paramdef>
29 <refsect1 id=
"parameters"><title>Parameters
</title>
32 <term><parameter>n
</parameter></term>
35 Specifies the number of textures to be queried.
40 <term><parameter>textures
</parameter></term>
43 Specifies an array containing the names of the textures to be queried.
48 <term><parameter>residences
</parameter></term>
51 Specifies an array in which the texture residence status is returned.
52 The residence status of a texture named by an element of
<parameter>textures
</parameter> is
53 returned in the corresponding element of
<parameter>residences
</parameter>.
59 <refsect1 id=
"description"><title>Description
</title>
62 a ``working set'' of textures that are resident in texture memory.
63 These textures can be bound to a texture target much more efficiently
64 than textures that are not resident.
67 <function>glAreTexturesResident
</function> queries the texture residence status of the
<parameter>n
</parameter> textures named by
68 the elements of
<parameter>textures
</parameter>.
69 If all the named textures are resident,
70 <function>glAreTexturesResident
</function> returns
<constant>GL_TRUE
</constant>,
71 and the contents of
<parameter>residences
</parameter> are undisturbed.
72 If not all the named textures are resident,
<function>glAreTexturesResident
</function> returns
<constant>GL_FALSE
</constant>,
73 and detailed status is returned in the
<parameter>n
</parameter> elements of
<parameter>residences
</parameter>.
74 If an element of
<parameter>residences
</parameter> is
<constant>GL_TRUE
</constant>, then the texture named by
75 the corresponding element of
<parameter>textures
</parameter> is resident.
78 The residence status of a single bound texture may also be queried
80 <citerefentry><refentrytitle>glGetTexParameter
</refentrytitle></citerefentry> with the
<emphasis>target
</emphasis> argument set to the
81 target to which the texture is bound, and the
<emphasis>pname
</emphasis> argument
82 set to
<constant>GL_TEXTURE_RESIDENT
</constant>.
83 This is the only way that the residence status of a default texture can be
87 <refsect1 id=
"notes"><title>Notes
</title>
89 <function>glAreTexturesResident
</function> is available only if the GL version is
1.1 or greater.
92 <function>glAreTexturesResident
</function> returns the residency status of the textures at the time of
93 invocation. It does not guarantee that the textures will remain
94 resident at any other time.
97 If textures reside in virtual memory (there is no texture memory), they
98 are considered always resident.
101 Some implementations may not load a texture until the first use of
105 <refsect1 id=
"errors"><title>Errors
</title>
107 <constant>GL_INVALID_VALUE
</constant> is generated if
<parameter>n
</parameter> is negative.
110 <constant>GL_INVALID_VALUE
</constant> is generated if any element in
<parameter>textures
</parameter>
111 is
0 or does not name a texture. In that case, the function returns
112 <constant>GL_FALSE
</constant> and the contents of
<parameter>residences
</parameter> is indeterminate.
115 <constant>GL_INVALID_OPERATION
</constant> is generated if
<function>glAreTexturesResident
</function> is executed
116 between the execution of
<citerefentry><refentrytitle>glBegin
</refentrytitle></citerefentry> and the corresponding
117 execution of
<citerefentry><refentrytitle>glEnd
</refentrytitle></citerefentry>.
120 <refsect1 id=
"associatedgets"><title>Associated Gets
</title>
122 <citerefentry><refentrytitle>glGetTexParameter
</refentrytitle></citerefentry> with parameter name
<constant>GL_TEXTURE_RESIDENT
</constant>
123 retrieves the residence status of a currently bound texture.
126 <refsect1 id=
"seealso"><title>See Also
</title>
128 <citerefentry><refentrytitle>glBindTexture
</refentrytitle></citerefentry>,
129 <citerefentry><refentrytitle>glGetTexParameter
</refentrytitle></citerefentry>,
130 <citerefentry><refentrytitle>glPrioritizeTextures
</refentrytitle></citerefentry>,
131 <citerefentry><refentrytitle>glTexImage1D
</refentrytitle></citerefentry>,
132 <citerefentry><refentrytitle>glTexImage2D
</refentrytitle></citerefentry>,
133 <citerefentry><refentrytitle>glTexImage3D
</refentrytitle></citerefentry>,
134 <citerefentry><refentrytitle>glTexParameter
</refentrytitle></citerefentry>
137 <refsect1 id=
"Copyright"><title>Copyright
</title>
139 Copyright
<trademark class=
"copyright"></trademark> 1991-
2006
140 Silicon Graphics, Inc. This document is licensed under the SGI
141 Free Software B License. For details, see
142 <ulink url=
"http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/
</ulink>.