Occlusion Query

From OpenGL Wiki
Revision as of 11:27, 1 May 2006 by Marco (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

How do I perform occlusion or visibility testing?

This is wrong!

OpenGL provides no direct support for determining whether a given primitive will be visible in a scene for a given viewpoint. At worst, an application will need to perform these tests manually. The previous question contains information on how to do this.

The code example from question 10.010 was combined with Nate Robins' excellent viewing tutorial to produce this view culling example code.

Higher-level APIs, such as Fahernheit Large Model, may provide this feature.

HP OpenGL platforms support an Occlusion Culling extension. To use this extension, enable the occlusion test, render some bounding geometry, and call glGetBooleanv() to obtain the visibility status of the geometry.