2

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:

  1. Should I implement querying and getting result in same frame or in two frames?
  2. How to draw the bounding box?
  3. 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.

Community
  • 1
  • 1
Lua Zhang
  • 63
  • 1
  • 7
  • now, question 1 & 3 is already solved, but I still don't know how to draw the bounding box of objects... – Lua Zhang Apr 25 '13 at 03:40
  • Would you mind updating this with an answer to what you found? – Xavier May 31 '13 at 15:49
  • @Xavier We should have an FBO for display, so we need create a new FBO for off-screen rendering. Before querying, we should switch to the off-screen FBO(just binding), and after querying we switch back to the main FBO. Then we can draw the object based on the query result. – Lua Zhang Jun 02 '13 at 03:48

0 Answers0