How fast occlusion query ?

How fast occlusion query ?

How it hurts fillrate ?

When to use it for best results ?

Thanks.

On a Geforce 5900 Ultra I can do 100,000 occlusion queries a second and measure 50 Million samples/second.

The spec explains how to best use it http://oss.sgi.com/projects/ogl-sample/registry/ARB/occlusion_query.txt

use ARB_oc with QUERY_RESULT_AVAILABLE_ARB give the higher performance.
Even on my GFX5200 is quite good (I can’t say right values - my OC bench have a bug :frowning: )

Generally speaking, the occlusion query is entirely for free. Rendering geometry and rasterising isn’t for free of course, but adding an occlusion query on top of existing rendering is for free. Querying the results may include a wait though, so you should query availability and do some useful stuff while waiting for it to complete. I’ve got a demo of this coming in the near future.