In iOS5, apple have added an extension named 'GL_EXT_occlusion_query_boolean' to help developers to implement occlusion culling.
I try to use it in my code, but I totally do not know how to use it.
These are my questions:
- Should I implement querying and getting result in same frame or in two frames?
- How to draw the bounding box?
- Should I switch to off-screen rendering before querying? if so, how should I do in order to achieve the off-screen rendering?
I have found a possible answer of this, but the code there is not very clear and missing some key code of using this extension.