Commit | Line | Data |
---|---|---|
7faf1d71 AW |
1 | <?xml version="1.0" encoding="UTF-8"?>\r |
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"\r | |
3 | "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">\r | |
4 | <refentry id="glQueryCounter">\r | |
5 | <refmeta>\r | |
6 | <refmetainfo>\r | |
7 | <copyright>\r | |
8 | <year>2010</year>\r | |
9 | <holder>Khronos Group</holder>\r | |
10 | </copyright>\r | |
11 | </refmetainfo>\r | |
12 | <refentrytitle>glQueryCounter</refentrytitle>\r | |
13 | <manvolnum>3G</manvolnum>\r | |
14 | </refmeta>\r | |
15 | <refnamediv>\r | |
16 | <refname>glQueryCounter</refname>\r | |
17 | <refpurpose>record the GL time into a query object after all previous commands have reached the GL server but have not yet necessarily executed.</refpurpose>\r | |
18 | </refnamediv>\r | |
19 | <refsynopsisdiv><title>C Specification</title>\r | |
20 | <funcsynopsis>\r | |
21 | <funcprototype>\r | |
22 | <funcdef>void <function>glQueryCounter</function></funcdef>\r | |
23 | <paramdef>GLuint <parameter>id</parameter></paramdef>\r | |
24 | <paramdef>GLenum <parameter>target</parameter></paramdef>\r | |
25 | </funcprototype>\r | |
26 | </funcsynopsis>\r | |
27 | </refsynopsisdiv>\r | |
28 | <refsect1 id="parameters"><title>Parameters</title>\r | |
29 | <variablelist>\r | |
30 | <varlistentry>\r | |
31 | <term><parameter>id</parameter></term>\r | |
32 | <listitem>\r | |
33 | <para>\r | |
34 | Specify the name of a query object into which to record the GL time.\r | |
35 | </para>\r | |
36 | </listitem>\r | |
37 | </varlistentry>\r | |
38 | <varlistentry>\r | |
39 | <term><parameter>target</parameter></term>\r | |
40 | <listitem>\r | |
41 | <para>\r | |
42 | Specify the counter to query. <parameter>target</parameter> must be <constant>GL_TIMESTAMP</constant>.\r | |
43 | </para>\r | |
44 | </listitem>\r | |
45 | </varlistentry>\r | |
46 | </variablelist>\r | |
47 | </refsect1>\r | |
48 | <refsect1 id="description"><title>Description</title>\r | |
49 | <para>\r | |
50 | <function>glQueryCounter</function> causes the GL to record the current time into the query object named <parameter>id</parameter>.\r | |
51 | <parameter>target</parameter> must be <constant>GL_TIMESTAMP</constant>. The time is recorded after all previous commands on the\r | |
52 | GL client and server state and the framebuffer have been fully realized. When the time is recorded, the query result for that object\r | |
53 | is marked available. <function>glQueryCounter</function> timer queries can be used within a <citerefentry><refentrytitle>glBeginQuery</refentrytitle></citerefentry> /\r | |
54 | <citerefentry><refentrytitle>glEndQuery</refentrytitle></citerefentry> block where the target is <constant>GL_TIME_ELAPSED</constant> and it does\r | |
55 | not affect the result of that query object.\r | |
56 | </para>\r | |
57 | </refsect1>\r | |
58 | <refsect1 id="notes"><title>Notes</title>\r | |
59 | <para>\r | |
60 | <function>glQueryCounter</function> is available only if the GL version is 3.3 or higher.\r | |
61 | </para>\r | |
62 | </refsect1>\r | |
63 | <refsect1 id="errors"><title>Errors</title>\r | |
64 | <para>\r | |
65 | <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>id</parameter> is the name\r | |
66 | of a query object that is already in use within a <citerefentry><refentrytitle>glBeginQuery</refentrytitle></citerefentry> /\r | |
67 | <citerefentry><refentrytitle>glEndQuery</refentrytitle></citerefentry> block.\r | |
68 | </para>\r | |
69 | <para>\r | |
70 | <constant>GL_INVALID_VALUE</constant> is generated if <parameter>id</parameter> is not the name of a query object returned\r | |
71 | from a previous call to <citerefentry><refentrytitle>glGenQueries</refentrytitle></citerefentry>.\r | |
72 | </para>\r | |
73 | <para>\r | |
74 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not <constant>GL_TIMESTAMP</constant>.\r | |
75 | </para>\r | |
76 | </refsect1>\r | |
77 | <refsect1 id="seealso"><title>See Also</title>\r | |
78 | <para>\r | |
79 | <citerefentry><refentrytitle>glGenQueries</refentrytitle></citerefentry>,\r | |
80 | <citerefentry><refentrytitle>glBeginQuery</refentrytitle></citerefentry>,\r | |
81 | <citerefentry><refentrytitle>glEndQuery</refentrytitle></citerefentry>,\r | |
82 | <citerefentry><refentrytitle>glDeleteQueries</refentrytitle></citerefentry>,\r | |
83 | <citerefentry><refentrytitle>glGetQueryObject</refentrytitle></citerefentry>,\r | |
84 | <citerefentry><refentrytitle>glGetQueryiv</refentrytitle></citerefentry>,\r | |
85 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>\r | |
86 | </para>\r | |
87 | </refsect1>\r | |
88 | <refsect1 id="Copyright"><title>Copyright</title>\r | |
89 | <para>\r | |
90 | Copyright <trademark class="copyright"></trademark> 2010 Khronos Group. \r | |
91 | This material may be distributed subject to the terms and conditions set forth in \r | |
92 | the Open Publication License, v 1.0, 8 June 1999.\r | |
93 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.\r | |
94 | </para>\r | |
95 | </refsect1>\r | |
96 | </refentry>\r |