'\" t .\" Title: glBeginConditionalRender .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 05/21/2015 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "GLBEGINCONDITIONALRE" "3G" "05/21/2015" "[FIXME: source]" "[FIXME: manual]" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" glBeginConditionalRender \- start conditional rendering .SH "C SPECIFICATION" .HP \w'void\ glBeginConditionalRender('u .BI "void glBeginConditionalRender(GLuint\ " "id" ", GLenum\ " "mode" ");" .HP \w'void\ glEndConditionalRender('u .BI "void glEndConditionalRender(" "void" ");" .SH "PARAMETERS FOR GLBEGINCONDITIONALRENDER" .PP \fIid\fR .RS 4 Specifies the name of an occlusion query object whose results are used to determine if the rendering commands are discarded\&. .RE .PP \fImode\fR .RS 4 Specifies how \fBglBeginConditionalRender\fR interprets the results of the occlusion query\&. .RE .SH "DESCRIPTION" .PP Conditional rendering is started using \fBglBeginConditionalRender\fR and ended using \fBglEndConditionalRender\fR\&. During conditional rendering, all vertex array commands, as well as \fBglClear\fR() and \fBglClearBuffer\fR() have no effect if the (\fBGL_SAMPLES_PASSED\fR) result of the query object \fIid\fR is zero, or if the (\fBGL_ANY_SAMPLES_PASSED\fR) result is \fBGL_FALSE\fR\&. The results of commands setting the current vertex state, such as \fBglVertexAttrib\fR() are undefined\&. If the (\fBGL_SAMPLES_PASSED\fR) result is non\-zero or if the (\fBGL_ANY_SAMPLES_PASSED\fR) result is \fBGL_TRUE\fR, such commands are not discarded\&. The \fIid\fR parameter to \fBglBeginConditionalRender\fR must be the name of a query object previously returned from a call to \fBglGenQueries\fR()\&. \fImode\fR specifies how the results of the query object are to be interpreted\&. If \fImode\fR is \fBGL_QUERY_WAIT\fR, the GL waits for the results of the query to be available and then uses the results to determine if subsequent rendering commands are discarded\&. If \fImode\fR is \fBGL_QUERY_NO_WAIT\fR, the GL may choose to unconditionally execute the subsequent rendering commands without waiting for the query to complete\&. .PP If \fImode\fR is \fBGL_QUERY_BY_REGION_WAIT\fR, the GL will also wait for occlusion query results and discard rendering commands if the result of the occlusion query is zero\&. If the query result is non\-zero, subsequent rendering commands are executed, 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 occlusion query\&. Any such discarding is done in an implementation\-dependent manner, but the rendering command results may not be discarded for any samples that contributed to the occlusion query sample count\&. If \fImode\fR is \fBGL_QUERY_BY_REGION_NO_WAIT\fR, the GL operates as in \fBGL_QUERY_BY_REGION_WAIT\fR, but may choose to unconditionally execute the subsequent rendering commands without waiting for the query to complete\&. .SH "NOTES" .PP \fBglBeginConditionalRender\fR and \fBglEndConditionalRender\fR are available only if the GL version is 3\&.0 or greater\&. .PP The \fBGL_ANY_SAMPLES_PASSED\fR query result is available only if the GL version is 3\&.3 or greater\&. .SH "ERRORS" .PP \fBGL_INVALID_VALUE\fR is generated if \fIid\fR is not the name of an existing query object\&. .PP \fBGL_INVALID_ENUM\fR is generated if \fImode\fR is not one of the accepted tokens\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fBglBeginConditionalRender\fR is called while conditional rendering is active, or if \fBglEndConditionalRender\fR is called while conditional rendering is inactive\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fIid\fR is the name of a query object with a target other than \fBGL_SAMPLES_PASSED\fR or \fBGL_ANY_SAMPLES_PASSED\fR\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fIid\fR is the name of a query currently in progress\&. .SH "VERSION SUPPORT" .TS allbox tab(:); lB cB s s s s s s s s s s s lB cB cB cB cB cB cB cB cB cB cB cB cB. T{ T}:T{ \fBOpenGL Version\fR T} T{ \fBFunction / Feature Name\fR T}:T{ \fB2\&.0\fR T}:T{ \fB2\&.1\fR T}:T{ \fB3\&.0\fR T}:T{ \fB3\&.1\fR T}:T{ \fB3\&.2\fR T}:T{ \fB3\&.3\fR T}:T{ \fB4\&.0\fR T}:T{ \fB4\&.1\fR T}:T{ \fB4\&.2\fR T}:T{ \fB4\&.3\fR T}:T{ \fB4\&.4\fR T}:T{ \fB4\&.5\fR T} .T& l c c c c c c c c c c c c l c c c c c c c c c c c c. T{ \fBglBeginConditionalRender\fR T}:T{ \- T}:T{ \- T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T} T{ \fBglEndConditionalRender\fR T}:T{ \- T}:T{ \- T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T} .TE .sp .SH "SEE ALSO" .PP \fBglGenQueries\fR(), \fBglDeleteQueries\fR(), \fBglBeginQuery\fR() .SH "COPYRIGHT" .PP Copyright \(co 2010\-2014 Khronos Group\&. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1\&.0, 8 June 1999\&. \m[blue]\fBhttp://opencontent\&.org/openpub/\fR\m[]\&. .SH "COPYRIGHT" .br Copyright \(co 2010-2014 Khronos Group .br