glGetBooleanv(GL_RENDERING)

Just something I have not yet found - when used in conjunction with glFlush() this query would tell us if there is still rendering being performed (true) or if the pipeline is empty (false).

If true, one could skip the frame about to be sent down the pipeline. This approach is better than glFinish, since the system can still operate asynchronously.

Default state is GL_FALSE. State is changed when glFlush is issued (to GL_TRUE). State may be changed when query command is issued, depending on whether the pipeline is empty or not.

Since glFlush unconditionally sets GL_TRUE and the state is not modified again unless this query is performed, it’s completely compatible with existing systems and will produce minimal additional overhead if a programmer chooses not to use it.

There may be an equivalent, but I have not yet found it, and I apologize if this is already in OpenGL somewhere.

Thanks,
– Jeff Duncan

You can do this with NV_fence. Set a fence, flush, and then use TestFenceNV to see if that point has been reached. (Don’t spam us with TestFence requests, because we are polling the adapter, and HW polling loops should always have a delay.)

  • Matt