include more low-level bindings
[clinton/guile-figl.git] / upstream-man-pages / man2 / 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 </refsynopsisdiv>
37 <refsect1 id="parameters"><title>Parameters</title>
38 <variablelist>
39 <varlistentry>
40 <term><parameter>id</parameter></term>
41 <listitem>
42 <para>
43 Specifies the name of a query object.
44 </para>
45 </listitem>
46 </varlistentry>
47 <varlistentry>
48 <term><parameter>pname</parameter></term>
49 <listitem>
50 <para>
51 Specifies the symbolic name of a query object parameter.
52 Accepted values are <constant>GL_QUERY_RESULT</constant> or <constant>GL_QUERY_RESULT_AVAILABLE</constant>.
53 </para>
54 </listitem>
55 </varlistentry>
56 <varlistentry>
57 <term><parameter>params</parameter></term>
58 <listitem>
59 <para>
60 Returns the requested data.
61 </para>
62 </listitem>
63 </varlistentry>
64 </variablelist>
65 </refsect1>
66 <refsect1 id="description"><title>Description</title>
67 <para>
68 <function>glGetQueryObject</function> returns in <parameter>params</parameter> a selected parameter of the query object
69 specified by <parameter>id</parameter>.
70 </para>
71 <para>
72 <parameter>pname</parameter> names a specific query object parameter. <parameter>pname</parameter> can be as follows:
73 </para>
74 <variablelist>
75 <varlistentry>
76 <term><constant>GL_QUERY_RESULT</constant></term>
77 <listitem>
78 <para>
79 <parameter>params</parameter> returns the value of the query object's passed samples counter.
80 The initial value is 0.
81 </para>
82 </listitem>
83 </varlistentry>
84 <varlistentry>
85 <term><constant>GL_QUERY_RESULT_AVAILABLE</constant></term>
86 <listitem>
87 <para>
88 <parameter>params</parameter> returns whether the passed samples counter is immediately available.
89 If a delay would occur waiting for the query result, <constant>GL_FALSE</constant> is returned.
90 Otherwise, <constant>GL_TRUE</constant> is returned, which also indicates that the results of all
91 previous queries are available as well.
92 </para>
93 </listitem>
94 </varlistentry>
95 </variablelist>
96 </refsect1>
97 <refsect1 id="notes"><title>Notes</title>
98 <para>
99 If an error is generated,
100 no change is made to the contents of <parameter>params</parameter>.
101 </para>
102 <para>
103 <function>glGetQueryObject</function> implicitly flushes the GL pipeline so that any incomplete rendering
104 delimited by the occlusion query completes in finite time.
105 </para>
106 <para>
107 If multiple queries are issued using the same query object <parameter>id</parameter> before calling
108 <function>glGetQueryObject</function>, the results of the most recent query will be returned. In this case,
109 when issuing a new query, the results of the previous query are discarded.
110 </para>
111 <para>
112 <function>glGetQueryObject</function> is available only if the GL version is 1.5 or greater.
113 </para>
114 </refsect1>
115 <refsect1 id="errors"><title>Errors</title>
116 <para>
117 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>pname</parameter> is not an accepted value.
118 </para>
119 <para>
120 <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>id</parameter> is not the name of a query object.
121 </para>
122 <para>
123 <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>id</parameter> is the name of a currently active
124 query object.
125 </para>
126 <para>
127 <constant>GL_INVALID_OPERATION</constant> is generated if <function>glGetQueryObject</function>
128 is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
129 and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
130 </para>
131 </refsect1>
132 <refsect1 id="seealso"><title>See Also</title>
133 <para>
134 <citerefentry><refentrytitle>glBeginQuery</refentrytitle></citerefentry>,
135 <citerefentry><refentrytitle>glEndQuery</refentrytitle></citerefentry>,
136 <citerefentry><refentrytitle>glGetQueryiv</refentrytitle></citerefentry>,
137 <citerefentry><refentrytitle>glIsQuery</refentrytitle></citerefentry>
138 </para>
139 </refsect1>
140 <refsect1 id="Copyright"><title>Copyright</title>
141 <para>
142 Copyright <trademark class="copyright"></trademark> 2005 Addison-Wesley.
143 This material may be distributed subject to the terms and conditions set forth in
144 the Open Publication License, v 1.0, 8 June 1999.
145 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
146 </para>
147 </refsect1>
148 </refentry>