include more low-level bindings
[clinton/guile-figl.git] / upstream-man-pages / man2 / glAreTexturesResident.xml
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">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>1991-2006</year>
9 <holder>Silicon Graphics, Inc.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glAreTexturesResident</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glAreTexturesResident</refname>
17 <refpurpose>determine if textures are loaded in texture memory</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
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>
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 queried.
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 queried.
44 </para>
45 </listitem>
46 </varlistentry>
47 <varlistentry>
48 <term><parameter>residences</parameter></term>
49 <listitem>
50 <para>
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>.
54 </para>
55 </listitem>
56 </varlistentry>
57 </variablelist>
58 </refsect1>
59 <refsect1 id="description"><title>Description</title>
60 <para>
61 GL establishes
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.
65 </para>
66 <para>
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.
76 </para>
77 <para>
78 The residence status of a single bound texture may also be queried
79 by calling
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
84 queried.
85 </para>
86 </refsect1>
87 <refsect1 id="notes"><title>Notes</title>
88 <para>
89 <function>glAreTexturesResident</function> is available only if the GL version is 1.1 or greater.
90 </para>
91 <para>
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.
95 </para>
96 <para>
97 If textures reside in virtual memory (there is no texture memory), they
98 are considered always resident.
99 </para>
100 <para>
101 Some implementations may not load a texture until the first use of
102 that texture.
103 </para>
104 </refsect1>
105 <refsect1 id="errors"><title>Errors</title>
106 <para>
107 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>n</parameter> is negative.
108 </para>
109 <para>
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.
113 </para>
114 <para>
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>.
118 </para>
119 </refsect1>
120 <refsect1 id="associatedgets"><title>Associated Gets</title>
121 <para>
122 <citerefentry><refentrytitle>glGetTexParameter</refentrytitle></citerefentry> with parameter name <constant>GL_TEXTURE_RESIDENT</constant>
123 retrieves the residence status of a currently bound texture.
124 </para>
125 </refsect1>
126 <refsect1 id="seealso"><title>See Also</title>
127 <para>
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>
135 </para>
136 </refsect1>
137 <refsect1 id="Copyright"><title>Copyright</title>
138 <para>
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>.
143 </para>
144 </refsect1>
145 </refentry>