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>
37 <refsect1 id=
"parameters"><title>Parameters
</title>
40 <term><parameter>id
</parameter></term>
43 Specifies the name of a query object.
48 <term><parameter>pname
</parameter></term>
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>.
57 <term><parameter>params
</parameter></term>
60 Returns the requested data.
66 <refsect1 id=
"description"><title>Description
</title>
68 <function>glGetQueryObject
</function> returns in
<parameter>params
</parameter> a selected parameter of the query object
69 specified by
<parameter>id
</parameter>.
72 <parameter>pname
</parameter> names a specific query object parameter.
<parameter>pname
</parameter> can be as follows:
76 <term><constant>GL_QUERY_RESULT
</constant></term>
79 <parameter>params
</parameter> returns the value of the query object's passed samples counter.
80 The initial value is
0.
85 <term><constant>GL_QUERY_RESULT_AVAILABLE
</constant></term>
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.
97 <refsect1 id=
"notes"><title>Notes
</title>
99 If an error is generated,
100 no change is made to the contents of
<parameter>params
</parameter>.
103 <function>glGetQueryObject
</function> implicitly flushes the GL pipeline so that any incomplete rendering
104 delimited by the occlusion query completes in finite time.
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.
112 <function>glGetQueryObject
</function> is available only if the GL version is
1.5 or greater.
115 <refsect1 id=
"errors"><title>Errors
</title>
117 <constant>GL_INVALID_ENUM
</constant> is generated if
<parameter>pname
</parameter> is not an accepted value.
120 <constant>GL_INVALID_OPERATION
</constant> is generated if
<parameter>id
</parameter> is not the name of a query object.
123 <constant>GL_INVALID_OPERATION
</constant> is generated if
<parameter>id
</parameter> is the name of a currently active
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>.
132 <refsect1 id=
"seealso"><title>See Also
</title>
134 <citerefentry><refentrytitle>glBeginQuery
</refentrytitle></citerefentry>,
135 <citerefentry><refentrytitle>glEndQuery
</refentrytitle></citerefentry>,
136 <citerefentry><refentrytitle>glGetQueryiv
</refentrytitle></citerefentry>,
137 <citerefentry><refentrytitle>glIsQuery
</refentrytitle></citerefentry>
140 <refsect1 id=
"Copyright"><title>Copyright
</title>
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>.