Draw predication in opengl

Is there a way to perform draw predication like it’s done in DX10 but using OpenGL, pls? Perhaps an specific extension I missed?

thx.

like http://www.opengl.org/registry/specs/NV/conditional_render.txt ?

Conditional rendering was added in OpenGL 3.0 as a core feature.

Oh, that’s nice. Could you tell me the exact functions to look for, please? Heheh, the gl.h is very large :stuck_out_tongue:

Section 2.14: Conditional Rendering

Conditional rendering can be used to discard rendering commands based on the
result of an occlusion query. Conditional rendering is started and stopped using the
commands

void BeginConditionalRender( uint id, enum mode );
void EndConditionalRender( void );

id specifies the name of an occlusion query object whose results are used to deter-
mine if the rendering commands are discarded. If the result (SAMPLES PASSED)
of the query is zero, all rendering commands between BeginConditionalRender
and the corresponding EndConditionalRender are discarded. In this case, Begin,
End, all vertex array commands performing an implicit Begin and End, Draw-
Pixels (see section 3.7.4), Bitmap (see section 3.8), Clear (see section 4.2.3),
Accum (see section 4.2.4), CopyPixels (see section 4.3.3), and EvalMesh1 and
EvalMesh2 (see section 5.1) have no effect. The effect of commands setting cur-
rent vertex state, such as Color or VertexAttrib, are undefined. If the result of the
occlusion query is non-zero, such commands are not discarded.

Link to the doc page where you can download the spec PDF’s:
http://www.opengl.org/documentation/specs/

thx rob!