Commit | Line | Data |
---|---|---|
7faf1d71 AW |
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"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>2005</year> | |
9 | <holder>Sams Publishing</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>glGetQueryiv</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>glGetQueryiv</refname> | |
17 | <refpurpose>return parameters of a query object target</refpurpose> | |
18 | </refnamediv> | |
19 | <refsynopsisdiv><title>C Specification</title> | |
20 | <funcsynopsis> | |
21 | <funcprototype> | |
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> | |
26 | </funcprototype> | |
27 | </funcsynopsis> | |
28 | </refsynopsisdiv> | |
29 | <refsect1 id="parameters"><title>Parameters</title> | |
30 | <variablelist> | |
31 | <varlistentry> | |
32 | <term><parameter>target</parameter></term> | |
33 | <listitem> | |
34 | <para> | |
35 | Specifies a query object target. | |
36 | Must be <constant>GL_SAMPLES_PASSED</constant>. | |
37 | </para> | |
38 | </listitem> | |
39 | </varlistentry> | |
40 | <varlistentry> | |
41 | <term><parameter>pname</parameter></term> | |
42 | <listitem> | |
43 | <para> | |
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>. | |
46 | </para> | |
47 | </listitem> | |
48 | </varlistentry> | |
49 | <varlistentry> | |
50 | <term><parameter>params</parameter></term> | |
51 | <listitem> | |
52 | <para> | |
53 | Returns the requested data. | |
54 | </para> | |
55 | </listitem> | |
56 | </varlistentry> | |
57 | </variablelist> | |
58 | </refsect1> | |
59 | <refsect1 id="description"><title>Description</title> | |
60 | <para> | |
61 | <function>glGetQueryiv</function> returns in <parameter>params</parameter> a selected parameter of the query object target | |
62 | specified by <parameter>target</parameter>. | |
63 | </para> | |
64 | <para> | |
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: | |
67 | </para> | |
68 | <variablelist> | |
69 | <varlistentry> | |
70 | <term><constant>GL_CURRENT_QUERY</constant></term> | |
71 | <listitem> | |
72 | <para> | |
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. | |
75 | </para> | |
76 | </listitem> | |
77 | </varlistentry> | |
78 | <varlistentry> | |
79 | <term><constant>GL_QUERY_COUNTER_BITS</constant></term> | |
80 | <listitem> | |
81 | <para> | |
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. | |
85 | </para> | |
86 | </listitem> | |
87 | </varlistentry> | |
88 | </variablelist> | |
89 | </refsect1> | |
90 | <refsect1 id="notes"><title>Notes</title> | |
91 | <para> | |
92 | If an error is generated, | |
93 | no change is made to the contents of <parameter>params</parameter>. | |
94 | </para> | |
95 | <para> | |
96 | <function>glGetQueryiv</function> is available only if the GL version is 1.5 or greater. | |
97 | </para> | |
98 | </refsect1> | |
99 | <refsect1 id="errors"><title>Errors</title> | |
100 | <para> | |
101 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> or <parameter>pname</parameter> is not an | |
102 | accepted value. | |
103 | </para> | |
104 | <para> | |
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>. | |
108 | </para> | |
109 | </refsect1> | |
110 | <refsect1 id="seealso"><title>See Also</title> | |
111 | <para> | |
112 | <citerefentry><refentrytitle>glGetQueryObject</refentrytitle></citerefentry>, | |
113 | <citerefentry><refentrytitle>glIsQuery</refentrytitle></citerefentry> | |
114 | </para> | |
115 | </refsect1> | |
116 | <refsect1 id="Copyright"><title>Copyright</title> | |
117 | <para> | |
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>. | |
122 | </para> | |
123 | </refsect1> | |
124 | </refentry> |