rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man2 / xhtml / glAreTexturesResident.xml
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>glAreTexturesResident</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glAreTexturesResident"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glAreTexturesResident — determine if textures are loaded in texture memory</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">GLboolean <b class="fsfunc">glAreTexturesResident</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>GLboolean *  </td><td><var class="pdparam">residences</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 queried.
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 queried.
7 </p></dd><dt><span class="term"><em class="parameter"><code>residences</code></em></span></dt><dd><p>
8 Specifies an array in which the texture residence status is returned.
9 The residence status of a texture named by an element of <em class="parameter"><code>textures</code></em> is
10 returned in the corresponding element of <em class="parameter"><code>residences</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 GL establishes
13 a ``working set'' of textures that are resident in texture memory.
14 These textures can be bound to a texture target much more efficiently
15 than textures that are not resident.
16 </p><p>
17 <code class="function">glAreTexturesResident</code> queries the texture residence status of the <em class="parameter"><code>n</code></em> textures named by
18 the elements of <em class="parameter"><code>textures</code></em>.
19 If all the named textures are resident,
20 <code class="function">glAreTexturesResident</code> returns <code class="constant">GL_TRUE</code>,
21 and the contents of <em class="parameter"><code>residences</code></em> are undisturbed.
22 If not all the named textures are resident, <code class="function">glAreTexturesResident</code> returns <code class="constant">GL_FALSE</code>,
23 and detailed status is returned in the <em class="parameter"><code>n</code></em> elements of <em class="parameter"><code>residences</code></em>.
24 If an element of <em class="parameter"><code>residences</code></em> is <code class="constant">GL_TRUE</code>, then the texture named by
25 the corresponding element of <em class="parameter"><code>textures</code></em> is resident.
26 </p><p>
27 The residence status of a single bound texture may also be queried
28 by calling
29 <a class="citerefentry" href="glGetTexParameter.xml"><span class="citerefentry"><span class="refentrytitle">glGetTexParameter</span></span></a> with the <span class="emphasis"><em>target</em></span> argument set to the
30 target to which the texture is bound, and the <span class="emphasis"><em>pname</em></span> argument
31 set to <code class="constant">GL_TEXTURE_RESIDENT</code>.
32 This is the only way that the residence status of a default texture can be
33 queried.
34 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>
35 <code class="function">glAreTexturesResident</code> is available only if the GL version is 1.1 or greater.
36 </p><p>
37 <code class="function">glAreTexturesResident</code> returns the residency status of the textures at the time of
38 invocation. It does not guarantee that the textures will remain
39 resident at any other time.
40 </p><p>
41 If textures reside in virtual memory (there is no texture memory), they
42 are considered always resident.
43 </p><p>
44 Some implementations may not load a texture until the first use of
45 that texture.
46 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
47 <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>n</code></em> is negative.
48 </p><p>
49 <code class="constant">GL_INVALID_VALUE</code> is generated if any element in <em class="parameter"><code>textures</code></em>
50 is 0 or does not name a texture. In that case, the function returns
51 <code class="constant">GL_FALSE</code> and the contents of <em class="parameter"><code>residences</code></em> is indeterminate.
52 </p><p>
53 <code class="constant">GL_INVALID_OPERATION</code> is generated if <code class="function">glAreTexturesResident</code> is executed
54 between the execution of <a class="citerefentry" href="glBegin.xml"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a> and the corresponding
55 execution of <a class="citerefentry" href="glEnd.xml"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a>.
56 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p>
57 <a class="citerefentry" href="glGetTexParameter.xml"><span class="citerefentry"><span class="refentrytitle">glGetTexParameter</span></span></a> with parameter name <code class="constant">GL_TEXTURE_RESIDENT</code>
58 retrieves the residence status of a currently bound texture.
59 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
60 <a class="citerefentry" href="glBindTexture.xml"><span class="citerefentry"><span class="refentrytitle">glBindTexture</span></span></a>,
61 <a class="citerefentry" href="glGetTexParameter.xml"><span class="citerefentry"><span class="refentrytitle">glGetTexParameter</span></span></a>,
62 <a class="citerefentry" href="glPrioritizeTextures.xml"><span class="citerefentry"><span class="refentrytitle">glPrioritizeTextures</span></span></a>,
63 <a class="citerefentry" href="glTexImage1D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage1D</span></span></a>,
64 <a class="citerefentry" href="glTexImage2D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage2D</span></span></a>,
65 <a class="citerefentry" href="glTexImage3D.xml"><span class="citerefentry"><span class="refentrytitle">glTexImage3D</span></span></a>,
66 <a class="citerefentry" href="glTexParameter.xml"><span class="citerefentry"><span class="refentrytitle">glTexParameter</span></span></a>
67 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p>
68 Copyright <span class="trademark"></span>© 1991-2006
69 Silicon Graphics, Inc. This document is licensed under the SGI
70 Free Software B License. For details, see
71 <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
72 </p></div></div></body></html>