Reputation: 64253
I have found glBeginQuery function in the OpenGL SDK.
So, what is the query object and how is it used?
Upvotes: 2
Views: 1845
Reputation: 11636
Look at occlusion query. It allows you to retrieve the number of fragments drawn.
A common usage for this extension is to draw bounding boxes of objects while color and zbuffer is in read only mode. Then, thanks to this query object you get the number of fragments that the bounding box would have drawn. If that number is bellow a certain threshold, you don't draw the corresponding geometry. That allows you to cull parts of the scene that is hidden by other objects (but still inside the frustum).
Upvotes: 3
Reputation: 96139
It's used to query properties of the object in the scene, eg. is it occluded
http://www.opengl-doc.com/Sams-OpenGL.SuperBible.Third/0672326019/ch17lev1sec3.html
Upvotes: 2