'\" t .\" Title: glBeginQueryIndexed, glEndQueryIndexed .\" 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 "GLBEGINQUERYINDEXED," "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" glBeginQueryIndexed,_glEndQueryIndexed \- delimit the boundaries of a query object on an indexed target .SH "C SPECIFICATION" .HP \w'void\ glBeginQueryIndexed('u .BI "void glBeginQueryIndexed(GLenum\ " "target" ", GLuint\ " "index" ", GLuint\ " "id" ");" .HP \w'void\ glEndQueryIndexed('u .BI "void glEndQueryIndexed(GLenum\ " "target" ", GLuint\ " "index" ");" .SH "PARAMETERS FOR GLBEGINQUERYINDEXED" .PP \fItarget\fR .RS 4 Specifies the target type of query object established between \fBglBeginQueryIndexed\fR and the subsequent \fBglEndQueryIndexed\fR()\&. The symbolic constant must be one of \fBGL_SAMPLES_PASSED\fR, \fBGL_ANY_SAMPLES_PASSED\fR, \fBGL_PRIMITIVES_GENERATED\fR, \fBGL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN\fR, or \fBGL_TIME_ELAPSED\fR\&. .RE .PP \fIindex\fR .RS 4 Specifies the index of the query target upon which to begin the query\&. .RE .PP \fIid\fR .RS 4 Specifies the name of a query object\&. .RE .SH "PARAMETERS FOR GLENDQUERYINDEXED" .PP \fItarget\fR .RS 4 Specifies the target type of query object to be concluded\&. The symbolic constant must be one of \fBGL_SAMPLES_PASSED\fR, \fBGL_ANY_SAMPLES_PASSED\fR, \fBGL_PRIMITIVES_GENERATED\fR, \fBGL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN\fR, or \fBGL_TIME_ELAPSED\fR\&. .RE .PP \fIindex\fR .RS 4 Specifies the index of the query target upon which to end the query\&. .RE .SH "DESCRIPTION" .PP \fBglBeginQueryIndexed\fR and \fBglEndQueryIndexed\fR() delimit the boundaries of a query object\&. \fIquery\fR must be a name previously returned from a call to \fBglGenQueries\fR()\&. If a query object with name \fIid\fR does not yet exist it is created with the type determined by \fItarget\fR\&. \fItarget\fR must be one of \fBGL_SAMPLES_PASSED\fR, \fBGL_ANY_SAMPLES_PASSED\fR, \fBGL_PRIMITIVES_GENERATED\fR, \fBGL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN\fR, or \fBGL_TIME_ELAPSED\fR\&. The behavior of the query object depends on its type and is as follows\&. .PP \fIindex\fR specifies the index of the query target and must be between a \fItarget\fR\-specific maximum\&. .PP If \fItarget\fR is \fBGL_SAMPLES_PASSED\fR, \fIid\fR must be an unused name, or the name of an existing occlusion query object\&. When \fBglBeginQueryIndexed\fR is executed, the query object\*(Aqs samples\-passed counter is reset to 0\&. Subsequent rendering will increment the counter for every sample that passes the depth test\&. If the value of \fBGL_SAMPLE_BUFFERS\fR is 0, then the samples\-passed count is incremented by 1 for each fragment\&. If the value of \fBGL_SAMPLE_BUFFERS\fR is 1, then the samples\-passed count is incremented by the number of samples whose coverage bit is set\&. However, implementations, at their discression may instead increase the samples\-passed count by the value of \fBGL_SAMPLES\fR if any sample in the fragment is covered\&. When \fBglEndQueryIndexed\fR is executed, the samples\-passed counter is assigned to the query object\*(Aqs result value\&. This value can be queried by calling \fBglGetQueryObject\fR() with \fIpname\fR\fBGL_QUERY_RESULT\fR\&. When \fItarget\fR is \fBGL_SAMPLES_PASSED\fR, \fIindex\fR must be zero\&. .PP If \fItarget\fR is \fBGL_ANY_SAMPLES_PASSED\fR, \fIid\fR must be an unused name, or the name of an existing boolean occlusion query object\&. When \fBglBeginQueryIndexed\fR is executed, the query object\*(Aqs samples\-passed flag is reset to \fBGL_FALSE\fR\&. Subsequent rendering causes the flag to be set to \fBGL_TRUE\fR if any sample passes the depth test\&. When \fBglEndQueryIndexed\fR is executed, the samples\-passed flag is assigned to the query object\*(Aqs result value\&. This value can be queried by calling \fBglGetQueryObject\fR() with \fIpname\fR\fBGL_QUERY_RESULT\fR\&. When \fItarget\fR is \fBGL_ANY_SAMPLES_PASSED\fR, \fIindex\fR must be zero\&. .PP If \fItarget\fR is \fBGL_PRIMITIVES_GENERATED\fR, \fIid\fR must be an unused name, or the name of an existing primitive query object previously bound to the \fBGL_PRIMITIVES_GENERATED\fR query binding\&. When \fBglBeginQueryIndexed\fR is executed, the query object\*(Aqs primitives\-generated counter is reset to 0\&. Subsequent rendering will increment the counter once for every vertex that is emitted from the geometry shader to the stream given by \fIindex\fR, or from the vertex shader if \fIindex\fR is zero and no geometry shader is present\&. When \fBglEndQueryIndexed\fR is executed, the primitives\-generated counter for stream \fIindex\fR is assigned to the query object\*(Aqs result value\&. This value can be queried by calling \fBglGetQueryObject\fR() with \fIpname\fR\fBGL_QUERY_RESULT\fR\&. When \fItarget\fR is \fBGL_PRIMITIVES_GENERATED\fR, \fIindex\fR must be less than the value of \fBGL_MAX_VERTEX_STREAMS\fR\&. .PP If \fItarget\fR is \fBGL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN\fR, \fIid\fR must be an unused name, or the name of an existing primitive query object previously bound to the \fBGL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN\fR query binding\&. When \fBglBeginQueryIndexed\fR is executed, the query object\*(Aqs primitives\-written counter for the stream specified by \fIindex\fR is reset to 0\&. Subsequent rendering will increment the counter once for every vertex that is written into the bound transform feedback buffer(s) for stream \fIindex\fR\&. If transform feedback mode is not activated between the call to \fBglBeginQueryIndexed\fR and \fBglEndQueryIndexed\fR, the counter will not be incremented\&. When \fBglEndQueryIndexed\fR is executed, the primitives\-written counter for stream \fIindex\fR is assigned to the query object\*(Aqs result value\&. This value can be queried by calling \fBglGetQueryObject\fR() with \fIpname\fR\fBGL_QUERY_RESULT\fR\&. When \fItarget\fR is \fBGL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN\fR, \fIindex\fR must be less than the value of \fBGL_MAX_VERTEX_STREAMS\fR\&. .PP If \fItarget\fR is \fBGL_TIME_ELAPSED\fR, \fIid\fR must be an unused name, or the name of an existing timer query object previously bound to the \fBGL_TIME_ELAPSED\fR query binding\&. When \fBglBeginQueryIndexed\fR is executed, the query object\*(Aqs time counter is reset to 0\&. When \fBglEndQueryIndexed\fR is executed, the elapsed server time that has passed since the call to \fBglBeginQueryIndexed\fR is written into the query object\*(Aqs time counter\&. This value can be queried by calling \fBglGetQueryObject\fR() with \fIpname\fR\fBGL_QUERY_RESULT\fR\&. When \fItarget\fR is \fBGL_TIME_ELAPSED\fR, \fIindex\fR must be zero\&. .PP Querying the \fBGL_QUERY_RESULT\fR implicitly flushes the GL pipeline until the rendering delimited by the query object has completed and the result is available\&. \fBGL_QUERY_RESULT_AVAILABLE\fR can be queried to determine if the result is immediately available or if the rendering is not yet complete\&. .SH "NOTES" .PP If the query target\*(Aqs count exceeds the maximum value representable in the number of available bits, as reported by \fBglGetQueryiv\fR() with \fItarget\fR set to the appropriate query target and \fIpname\fR\fBGL_QUERY_COUNTER_BITS\fR, the count becomes undefined\&. .PP An implementation may support 0 bits in its counter, in which case query results are always undefined and essentially useless\&. .PP When \fBGL_SAMPLE_BUFFERS\fR is 0, the samples\-passed counter of an occlusion query will increment once for each fragment that passes the depth test\&. When \fBGL_SAMPLE_BUFFERS\fR is 1, an implementation may either increment the samples\-passed counter individually for each sample of a fragment that passes the depth test, or it may choose to increment the counter for all samples of a fragment if any one of them passes the depth test\&. .PP Calling \fBglBeginQuery\fR() or \fBglEndQuery\fR() is equivalent to calling \fBglBeginQueryIndexed\fR() or \fBglEndQueryIndexed\fR() with \fIindex\fR set to zero, respectively\&. .SH "ERRORS" .PP \fBGL_INVALID_ENUM\fR is generated if \fItarget\fR is not one of the accepted tokens\&. .PP \fBGL_INVALID_VALUE\fR is generated if \fIindex\fR is greater than the query target\-specific maximum\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fBglBeginQueryIndexed\fR is executed while a query object of the same \fItarget\fR is already active\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fBglEndQueryIndexed\fR() is executed when a query object of the same \fItarget\fR is not active\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fIid\fR is 0\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fIid\fR is the name of an already active query object\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fIid\fR refers to an existing query object whose type does not does not match \fItarget\fR\&. .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{ \fBglBeginQueryIndexed\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{ \fBglEndQueryIndexed\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 \fBglBeginQuery\fR(), \fBglDeleteQueries\fR(), \fBglEndQuery\fR(), \fBglGenQueries\fR(), \fBglGetQueryObject\fR(), \fBglGetQueryiv\fR(), \fBglIsQuery\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