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">
9 <holder>Sams Publishing
</holder>
12 <refentrytitle>glGetQueryObject
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glGetQueryObject
</refname>
17 <refpurpose>return parameters of a query object
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
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>
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>
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>
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>
53 <refsect1 id=
"parameters"><title>Parameters
</title>
56 <term><parameter>id
</parameter></term>
59 Specifies the name of a query object.
64 <term><parameter>pname
</parameter></term>
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>.
73 <term><parameter>params
</parameter></term>
76 Returns the requested data.
82 <refsect1 id=
"description"><title>Description
</title>
84 <function>glGetQueryObject
</function> returns in
<parameter>params
</parameter> a selected parameter of the query object
85 specified by
<parameter>id
</parameter>.
88 <parameter>pname
</parameter> names a specific query object parameter.
<parameter>pname
</parameter> can be as follows:
92 <term><constant>GL_QUERY_RESULT
</constant></term>
95 <parameter>params
</parameter> returns the value of the query object's passed samples counter.
96 The initial value is
0.
101 <term><constant>GL_QUERY_RESULT_AVAILABLE
</constant></term>
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.
113 <refsect1 id=
"notes"><title>Notes
</title>
115 If an error is generated,
116 no change is made to the contents of
<parameter>params
</parameter>.
119 <function>glGetQueryObject
</function> implicitly flushes the GL pipeline so that any incomplete rendering
120 delimited by the occlusion query completes in finite time.
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.
128 <function>glGetQueryObjecti64v
</function> and
<function>glGetQueryObjectui64v
</function> are available only
129 if the GL version is
3.3 or greater.
132 <refsect1 id=
"errors"><title>Errors
</title>
134 <constant>GL_INVALID_ENUM
</constant> is generated if
<parameter>pname
</parameter> is not an accepted value.
137 <constant>GL_INVALID_OPERATION
</constant> is generated if
<parameter>id
</parameter> is not the name of a query object.
140 <constant>GL_INVALID_OPERATION
</constant> is generated if
<parameter>id
</parameter> is the name of a currently active
144 <refsect1 id=
"seealso"><title>See Also
</title>
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>
153 <refsect1 id=
"Copyright"><title>Copyright
</title>
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>.