rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man4 / glGetQueryObject.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="glGetQueryObject">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2005</year>
9 <holder>Sams Publishing</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glGetQueryObject</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glGetQueryObject</refname>
17 <refpurpose>return parameters of a query object</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glGetQueryObjectiv</function></funcdef>
23 <paramdef>GLuint <parameter>id</parameter></paramdef>
24 <paramdef>GLenum <parameter>pname</parameter></paramdef>
25 <paramdef>GLint * <parameter>params</parameter></paramdef>
26 </funcprototype>
27 </funcsynopsis>
28 <funcsynopsis>
29 <funcprototype>
30 <funcdef>void <function>glGetQueryObjectuiv</function></funcdef>
31 <paramdef>GLuint <parameter>id</parameter></paramdef>
32 <paramdef>GLenum <parameter>pname</parameter></paramdef>
33 <paramdef>GLuint * <parameter>params</parameter></paramdef>
34 </funcprototype>
35 </funcsynopsis>
36 <funcsynopsis>
37 <funcprototype>
38 <funcdef>void <function>glGetQueryObjecti64v</function></funcdef>
39 <paramdef>GLuint <parameter>id</parameter></paramdef>
40 <paramdef>GLenum <parameter>pname</parameter></paramdef>
41 <paramdef>GLint64 * <parameter>params</parameter></paramdef>
42 </funcprototype>
43 </funcsynopsis>
44 <funcsynopsis>
45 <funcprototype>
46 <funcdef>void <function>glGetQueryObjectui64v</function></funcdef>
47 <paramdef>GLuint <parameter>id</parameter></paramdef>
48 <paramdef>GLenum <parameter>pname</parameter></paramdef>
49 <paramdef>GLuint64 * <parameter>params</parameter></paramdef>
50 </funcprototype>
51 </funcsynopsis>
52 </refsynopsisdiv>
53 <refsect1 id="parameters"><title>Parameters</title>
54 <variablelist>
55 <varlistentry>
56 <term><parameter>id</parameter></term>
57 <listitem>
58 <para>
59 Specifies the name of a query object.
60 </para>
61 </listitem>
62 </varlistentry>
63 <varlistentry>
64 <term><parameter>pname</parameter></term>
65 <listitem>
66 <para>
67 Specifies the symbolic name of a query object parameter.
68 Accepted values are <constant>GL_QUERY_RESULT</constant> or <constant>GL_QUERY_RESULT_AVAILABLE</constant>.
69 </para>
70 </listitem>
71 </varlistentry>
72 <varlistentry>
73 <term><parameter>params</parameter></term>
74 <listitem>
75 <para>
76 Returns the requested data.
77 </para>
78 </listitem>
79 </varlistentry>
80 </variablelist>
81 </refsect1>
82 <refsect1 id="description"><title>Description</title>
83 <para>
84 <function>glGetQueryObject</function> returns in <parameter>params</parameter> a selected parameter of the query object
85 specified by <parameter>id</parameter>.
86 </para>
87 <para>
88 <parameter>pname</parameter> names a specific query object parameter. <parameter>pname</parameter> can be as follows:
89 </para>
90 <variablelist>
91 <varlistentry>
92 <term><constant>GL_QUERY_RESULT</constant></term>
93 <listitem>
94 <para>
95 <parameter>params</parameter> returns the value of the query object's passed samples counter.
96 The initial value is 0.
97 </para>
98 </listitem>
99 </varlistentry>
100 <varlistentry>
101 <term><constant>GL_QUERY_RESULT_AVAILABLE</constant></term>
102 <listitem>
103 <para>
104 <parameter>params</parameter> returns whether the passed samples counter is immediately available.
105 If a delay would occur waiting for the query result, <constant>GL_FALSE</constant> is returned.
106 Otherwise, <constant>GL_TRUE</constant> is returned, which also indicates that the results of all
107 previous queries are available as well.
108 </para>
109 </listitem>
110 </varlistentry>
111 </variablelist>
112 </refsect1>
113 <refsect1 id="notes"><title>Notes</title>
114 <para>
115 If an error is generated,
116 no change is made to the contents of <parameter>params</parameter>.
117 </para>
118 <para>
119 <function>glGetQueryObject</function> implicitly flushes the GL pipeline so that any incomplete rendering
120 delimited by the occlusion query completes in finite time.
121 </para>
122 <para>
123 If multiple queries are issued using the same query object <parameter>id</parameter> before calling
124 <function>glGetQueryObject</function>, the results of the most recent query will be returned. In this case,
125 when issuing a new query, the results of the previous query are discarded.
126 </para>
127 <para>
128 <function>glGetQueryObjecti64v</function> and <function>glGetQueryObjectui64v</function> are available only
129 if the GL version is 3.3 or greater.
130 </para>
131 </refsect1>
132 <refsect1 id="errors"><title>Errors</title>
133 <para>
134 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>pname</parameter> is not an accepted value.
135 </para>
136 <para>
137 <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>id</parameter> is not the name of a query object.
138 </para>
139 <para>
140 <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>id</parameter> is the name of a currently active
141 query object.
142 </para>
143 </refsect1>
144 <refsect1 id="seealso"><title>See Also</title>
145 <para>
146 <citerefentry><refentrytitle>glBeginQuery</refentrytitle></citerefentry>,
147 <citerefentry><refentrytitle>glEndQuery</refentrytitle></citerefentry>,
148 <citerefentry><refentrytitle>glGetQueryiv</refentrytitle></citerefentry>,
149 <citerefentry><refentrytitle>glIsQuery</refentrytitle></citerefentry>,
150 <citerefentry><refentrytitle>glQueryCounter</refentrytitle></citerefentry>
151 </para>
152 </refsect1>
153 <refsect1 id="Copyright"><title>Copyright</title>
154 <para>
155 Copyright <trademark class="copyright"></trademark> 2005 Addison-Wesley.
156 This material may be distributed subject to the terms and conditions set forth in
157 the Open Publication License, v 1.0, 8 June 1999.
158 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
159 </para>
160 </refsect1>
161 </refentry>