Vertex Rendering is the process of taking vertex data specified in arrays and rendering one or more Primitives with this vertex data.
Drawing from user code
Transform feedback rendering
|Core in version||3.0|
Conditional rendering is a mechanism for making the execution of one or more rendering commands conditional on the result of an Occlusion Query operation. This is done with the following functions:
glBeginConditionalRender(GLuint id, GLenum mode); glEndConditionalRender();
All rendering commands issued within the boundaries of these two functions will only execute if the occlusion condition specified by id is tested to be true. For GL_SAMPLES_PASSED queries, it is considered true (and thus rendering commands are executed) if the number of samples is not zero.
The commands that can be conditioned are:
- All functions of the form glDraw*.
- glClear and glClearBuffer.
- glDispatchCompute and glDispatchComputeIndirect.
The mode parameter determines how the discarding of the rendering functions is performed. It can be one of the following:
- GL_QUERY_WAIT: OpenGL will wait until the query result is returned, then decide whether to execute the rendering command. This ensures that the rendering commands will only be executed if the query fails.
- GL_QUERY_NO_WAIT: OpenGL may execute the rendering commands anyway. It will not wait to see if the query test is true or not. This is used to prevent pipeline stalls if the time between the query test and the execution of the rendering commands is too short.
- GL_QUERY_BY_REGION_WAIT: OpenGL will wait until the query result is returned, then decide whether to execute the rendering command. However, the rendered results will be clipped to the samples that were actually rasterized in the occlusion query. Thus, the rendered result can never appear outside of the occlusion query area.
- GL_QUERY_BY_REGION_NO_WAIT: As above, except that it may not wait until the occlusion query is finished. The region clipping still holds.
- Category:Core API Ref Vertex Rendering: Reference documentation for vertex array rendering functions.
|This article is a stub. You can help the OpenGL Wiki by expanding it.|