Jump to content
  • Advertisement

Archived

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

aker_jus

Terrain VertexBuffer switching.

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

Hello, after some weeks, I have my terrain renderer working. I have divided my terrain into chunks of 32x32, each with its own VB. The thing is, if I have a 2048x2048 terrain, that consists of 64 chunks, so 64 VBs. In the render function, I iterate through the chunks, set vbs, textures, materials, and render. Is there any way I can reduce the VB switching? How do you manage your terrain vertexbuffer(s)? Thanks

Share this post


Link to post
Share on other sites
Advertisement
I do exactly the same thing with my terrain renderer, what you can do is use frustrum culling to determine wich chunks you are watching and just render those.

And just to settle this you have:
2048x2048 / 32x32 chunks = 4096 pieces.

If God with me, Who against me?

[edited by - NeonGE on April 29, 2003 10:34:31 AM]

Share this post


Link to post
Share on other sites
Rather than switching vertex buffers so often (Which can be a rather expensive operation sometimes) why not determine which chuncks are visible and then copy their vertices into a large dynamic vertex buffer?

This way you only end up with one vertex buffer and copying into one is mighty quick.

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!