Jump to content
  • Advertisement

Archived

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

cruZ

VertexBuffers and Quad/BSP Tree

This topic is 6101 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''m currently using no specific vis. determination algorithm in my landscape renderer. That means I only fill my vertex buffer at startup and as the geometry is static anyway, I don''t need to change the content of the buffer during runtime. For small landscapes this works very fast. But what if I use some sort of visiblity det. ? The logical solution for me would be: -Traverse quad/bsp tree. -lock the vb -fill vb with visible vertices. -unlock vb. -set texture -drawprimitive -set next texture -draw next primitive and so on ->do this every frame. I''m not sure if this is a good very solution, because lock/unlock is said to be very time consuming and should be avoided.

Share this post


Link to post
Share on other sites
Advertisement
why dont u just use drawprimitive instead of
locking and unlocking the vertexbuffer ??

thats what i did and its quite fast because i think
lock and unlock overhead is quite high ..



{ Stating the obvious never helped any situation !! }

Share this post


Link to post
Share on other sites
The way to do it is to have a static vertex buffer and a dynamic index buffer.

First load up your vertex buffer with every last bit of terrain data you are going to draw. Set that vb as the stream source, and then each frame build an index buffer saying which vertices will be used. This method of terrain rendering is ass-fast.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!