Hi,
I am trying to use occlusion queries for objects that are hidden by other objects:
- render bounding volume of some object
- check if any fragment of the volume passed the depth test
- if not: don’t render object
to do this I need to disable writes to color and depth buffer when rendering a bounding volume in a way that keeps the depth test (for the queries).
The documentation says, that GL_ANY_SAMPLES_PASSED gives me true, if any sample passed the depth test. I thought, okay… I can just enable the stencil test with GL_NEVER, but sadly this has not worked.
Is there a way to do this?