Jump to content
  • Advertisement
Sign in to follow this  
Malchivus

ARB occlusion: simple reuse?

This topic is 5396 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

after i generate, use and retrieve information from an oclusion query (lets say i'm doing one at a time) can i just re-use it. ie:(the '+'s are supposed to be tabs, the forum won't let me do spaces...) main draw loop gen 1 oclusion query for each thing to draw loop +start oclusion query ++send geommetry +end oclusion query +retirieve oclusion query result +if worth drawing then ++draw geometry +go to next thing to draw end draw loop delete oclusion query or should i just generate and delete a new oclusion query for each time i need to use it?

Share this post


Link to post
Share on other sites
Advertisement
Yes, cou could do this, but its slow for, oh so many reasons. The 'usual' approach is to either add occlusion query to each object or create a big pool of then and add them to objects dynamicly. You also never do this test-query-render thing. You always send a bunch of querys, then do some other processing if possible then get the results and render what needs to be. You might what to use google a bit since there has been quite some papers on how to use HW oclusion query to actualy gain speed.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!