I came with this problem when implementing NV occlusing test. We should ask for a test, do sometihng else and after that see if the results are available. But what if I don’t have nothing to do? I mean, occlusing should be the first thing to do right? So, not taking advantage of this feature, what’s better? To do my own occlusion tests or let the card do it even asking the result imediatly?
You have to occlusion test against SOMETHING.
You should interleave real drawing with occlusion testing. For example:
if 1 draw1
if 2 draw2
if 3 draw3
if 4 draw4
if 5 draw5
This is only worth doing in some circumstances, sometimes the savings aren’t worth the overhead. It depends on how fill limited you are, how complex your geometry is and how much stuff fails the occlusion test.
For example, in an octree, if test 1 fails, no need to make test2…