Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Dwiel

oct / quad tree quick Q

This topic is 6129 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

I have an octree sort of thing, but I can''t figure out how to keep my engine from drawing an object over again if it finds it in many nodes, a very large wall would do this for ex. Would you just have a draw tag on EVERY object, cycle throught each object and if it has a true value in the draw var then draw it? I just can''t think of any other way to do it. Is the previously mentioned example really how you do it? Thanx ahead! Zach Dwiel ~ Tazzeld

Share this post


Link to post
Share on other sites
Advertisement
thats pretty much what you need to do...

at the start of each frame, set all your tags to false. Then, as you traverse the tree, set the tag of any nodes/objects found to be visible to be true (NOTE: i don''t render as i go, only check visibility). Finally, gather up all your visible objects/nodes and render them as a big fat batch

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!