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=
"glGetQueryiv">
9 <holder>Sams Publishing
</holder>
12 <refentrytitle>glGetQueryiv
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glGetQueryiv
</refname>
17 <refpurpose>return parameters of a query object target
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>glGetQueryiv
</function></funcdef>
23 <paramdef>GLenum
<parameter>target
</parameter></paramdef>
24 <paramdef>GLenum
<parameter>pname
</parameter></paramdef>
25 <paramdef>GLint *
<parameter>params
</parameter></paramdef>
29 <refsect1 id=
"parameters"><title>Parameters
</title>
32 <term><parameter>target
</parameter></term>
35 Specifies a query object target.
36 Must be
<constant>GL_SAMPLES_PASSED
</constant>.
41 <term><parameter>pname
</parameter></term>
44 Specifies the symbolic name of a query object target parameter.
45 Accepted values are
<constant>GL_CURRENT_QUERY
</constant> or
<constant>GL_QUERY_COUNTER_BITS
</constant>.
50 <term><parameter>params
</parameter></term>
53 Returns the requested data.
59 <refsect1 id=
"description"><title>Description
</title>
61 <function>glGetQueryiv
</function> returns in
<parameter>params
</parameter> a selected parameter of the query object target
62 specified by
<parameter>target
</parameter>.
65 <parameter>pname
</parameter> names a specific query object target parameter. When
<parameter>target
</parameter> is
66 <constant>GL_SAMPLES_PASSED
</constant>,
<parameter>pname
</parameter> can be as follows:
70 <term><constant>GL_CURRENT_QUERY
</constant></term>
73 <parameter>params
</parameter> returns the name of the currently active occlusion query object.
74 If no occlusion query is active,
0 is returned. The initial value is
0.
79 <term><constant>GL_QUERY_COUNTER_BITS
</constant></term>
82 <parameter>params
</parameter> returns the number of bits in the query counter used to accumulate passing samples.
83 If the number of bits returned is
0, the implementation does not support a query counter, and the results
84 obtained from
<citerefentry><refentrytitle>glGetQueryObject
</refentrytitle></citerefentry> are useless.
90 <refsect1 id=
"notes"><title>Notes
</title>
92 If an error is generated,
93 no change is made to the contents of
<parameter>params
</parameter>.
96 <function>glGetQueryiv
</function> is available only if the GL version is
1.5 or greater.
99 <refsect1 id=
"errors"><title>Errors
</title>
101 <constant>GL_INVALID_ENUM
</constant> is generated if
<parameter>target
</parameter> or
<parameter>pname
</parameter> is not an
105 <constant>GL_INVALID_OPERATION
</constant> is generated if
<function>glGetQueryiv
</function>
106 is executed between the execution of
<citerefentry><refentrytitle>glBegin
</refentrytitle></citerefentry>
107 and the corresponding execution of
<citerefentry><refentrytitle>glEnd
</refentrytitle></citerefentry>.
110 <refsect1 id=
"seealso"><title>See Also
</title>
112 <citerefentry><refentrytitle>glGetQueryObject
</refentrytitle></citerefentry>,
113 <citerefentry><refentrytitle>glIsQuery
</refentrytitle></citerefentry>
116 <refsect1 id=
"Copyright"><title>Copyright
</title>
118 Copyright
<trademark class=
"copyright"></trademark> 2005 Addison-Wesley.
119 This material may be distributed subject to the terms and conditions set forth in
120 the Open Publication License, v
1.0,
8 June
1999.
121 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.