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="glBeginConditionalRender">\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>glBeginConditionalRender</refentrytitle>\r | |
13 | <manvolnum>3G</manvolnum>\r | |
14 | </refmeta>\r | |
15 | <refnamediv>\r | |
16 | <refname>glBeginConditionalRender</refname>\r | |
17 | <refpurpose>start conditional rendering</refpurpose>\r | |
18 | </refnamediv>\r | |
19 | <refsynopsisdiv><title>C Specification</title>\r | |
20 | <funcsynopsis>\r | |
21 | <funcprototype>\r | |
22 | <funcdef>void <function>glBeginConditionalRender</function></funcdef>\r | |
23 | <paramdef>GLuint <parameter>id</parameter></paramdef>\r | |
24 | <paramdef>GLenum <parameter>mode</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 | Specifies the name of an occlusion query object whose results are used to determine if the rendering commands are discarded.\r | |
35 | </para>\r | |
36 | </listitem>\r | |
37 | </varlistentry>\r | |
38 | <varlistentry>\r | |
39 | <term><parameter>mode</parameter></term>\r | |
40 | <listitem>\r | |
41 | <para>\r | |
42 | Specifies how <function>glBeginConditionalRender</function> interprets the results of the occlusion query.\r | |
43 | </para>\r | |
44 | </listitem>\r | |
45 | </varlistentry>\r | |
46 | </variablelist>\r | |
47 | </refsect1>\r | |
48 | <refsynopsisdiv><title>C Specification</title>\r | |
49 | <funcsynopsis>\r | |
50 | <funcprototype>\r | |
51 | <funcdef>void <function>glEndConditionalRender</function></funcdef>\r | |
52 | <paramdef><parameter>void</parameter></paramdef>\r | |
53 | </funcprototype>\r | |
54 | </funcsynopsis>\r | |
55 | </refsynopsisdiv>\r | |
56 | <refsect1 id="description"><title>Description</title>\r | |
57 | <para>\r | |
58 | Conditional rendering is started using <function>glBeginConditionalRender</function> and ended using <function>glEndConditionalRender</function>.\r | |
59 | During conditional rendering, all vertex array commands, as well as <citerefentry><refentrytitle>glClear</refentrytitle></citerefentry> and\r | |
60 | <citerefentry><refentrytitle>glClearBuffer</refentrytitle></citerefentry> have no effect if the (<constant>GL_SAMPLES_PASSED</constant>) result\r | |
61 | of the query object <parameter>id</parameter> is zero, or if the (<constant>GL_ANY_SAMPLES_PASSED</constant>) result is <constant>GL_FALSE</constant>.\r | |
62 | The results of commands setting the current vertex state, such as <citerefentry><refentrytitle>glVertexAttrib</refentrytitle></citerefentry> are\r | |
63 | undefined. If the (<constant>GL_SAMPLES_PASSED</constant>) result is non-zero or if the (<constant>GL_ANY_SAMPLES_PASSED</constant>) result is\r | |
64 | <constant>GL_TRUE</constant>, such commands are not discarded. The <parameter>id</parameter> parameter to <function>glBeginConditionalRender</function>\r | |
65 | must be the name of a query object previously returned from a call to <citerefentry><refentrytitle>glGenQueries</refentrytitle></citerefentry>.\r | |
66 | <parameter>mode</parameter> specifies how the results of the query object are to be interpreted. If <parameter>mode</parameter> is\r | |
67 | <constant>GL_QUERY_WAIT</constant>, the GL waits for the results of the query to be available and then uses the results to determine if subsequent\r | |
68 | rendering commands are discarded. If <parameter>mode</parameter> is <constant>GL_QUERY_NO_WAIT</constant>, the GL may choose to unconditionally\r | |
69 | execute the subsequent rendering commands without waiting for the query to complete.\r | |
70 | </para>\r | |
71 | <para>\r | |
72 | If <parameter>mode</parameter> is <constant>GL_QUERY_BY_REGION_WAIT</constant>, the GL will also wait for occlusion query results and discard\r | |
73 | rendering commands if the result of the occlusion query is zero. If the query result is non-zero, subsequent rendering commands are executed,\r | |
74 | but the GL may discard the results of the commands for any region of the framebuffer that did not contribute to the sample count in the specified\r | |
75 | occlusion query. Any such discarding is done in an implementation-dependent manner, but the rendering command results may not be discarded for\r | |
76 | any samples that contributed to the occlusion query sample count. If <parameter>mode</parameter> is <constant>GL_QUERY_BY_REGION_NO_WAIT</constant>,\r | |
77 | the GL operates as in <constant>GL_QUERY_BY_REGION_WAIT</constant>, but may choose to unconditionally execute the subsequent rendering commands\r | |
78 | without waiting for the query to complete.\r | |
79 | </para>\r | |
80 | </refsect1>\r | |
81 | <refsect1 id="notes"><title>Notes</title>\r | |
82 | <para>\r | |
83 | <function>glBeginConditionalRender</function> and <function>glEndConditionalRender</function> are available only if the GL version is 3.0 or greater.\r | |
84 | </para>\r | |
85 | <para>\r | |
86 | The <constant>GL_ANY_SAMPLES_PASSED</constant> query result is available only if the GL version is 3.3 or greater.\r | |
87 | </para>\r | |
88 | </refsect1>\r | |
89 | <refsect1 id="errors"><title>Errors</title>\r | |
90 | <para>\r | |
91 | <constant>GL_INVALID_VALUE</constant> is generated if <parameter>id</parameter> is not the name of an existing query object.\r | |
92 | </para>\r | |
93 | <para>\r | |
94 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>mode</parameter> is not one of the accepted tokens.\r | |
95 | </para>\r | |
96 | <para>\r | |
97 | <constant>GL_INVALID_OPERATION</constant> is generated if <function>glBeginConditionalRender</function> is called while conditional rendering is active,\r | |
98 | or if <function>glEndConditionalRender</function> is called while conditional rendering is inactive.\r | |
99 | </para>\r | |
100 | <para>\r | |
101 | <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>id</parameter> is the name of a query object with a target other than\r | |
102 | <constant>GL_SAMPLES_PASSED</constant> or <constant>GL_ANY_SAMPLES_PASSED</constant>.\r | |
103 | </para>\r | |
104 | <para>\r | |
105 | <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>id</parameter> is the name of a query currently in progress.\r | |
106 | </para>\r | |
107 | </refsect1>\r | |
108 | <refsect1 id="seealso"><title>See Also</title>\r | |
109 | <para>\r | |
110 | <citerefentry><refentrytitle>glGenQueries</refentrytitle></citerefentry>,\r | |
111 | <citerefentry><refentrytitle>glDeleteQueries</refentrytitle></citerefentry>,\r | |
112 | <citerefentry><refentrytitle>glBeginQuery</refentrytitle></citerefentry>\r | |
113 | </para>\r | |
114 | </refsect1>\r | |
115 | <refsect1 id="Copyright"><title>Copyright</title>\r | |
116 | <para>\r | |
117 | Copyright <trademark class="copyright"></trademark> 2009 Khronos Group. \r | |
118 | This material may be distributed subject to the terms and conditions set forth in \r | |
119 | the Open Publication License, v 1.0, 8 June 1999.\r | |
120 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.\r | |
121 | </para>\r | |
122 | </refsect1>\r | |
123 | </refentry>\r |