Skip to main content
gamedev.net
🔒 Locked

Optimizing Dynamic Vertex Buffer

Started by Believe82 Apr 4, 2011 at 1:37 PM 1 replies 1.3k views
Original Post
Believe82
Believe82
Hello,

For iterating through vertex buffers and index buffers, it would seem especially for dynamic buffers, that I would have to iterate through all of my vertex buffers going through each row and column updating the current solution, then I would have to iterate go to the beginning of my vertex buffer memory block and write in the new properties of the vertex to each vertex in my buffer. I think this would be a bit ridiculous especially when you begin rendering large maps.

My question is, is there a way to optimize these loops to get better machine performance? I think double loops are the only way to do it, even though it is O(n[sup]2[/sup]) I need to draw every vertex. Algorithm wise, maybe a function that skips over unseen vertices (I already tried back culling) if anyone knows any way to optimize the dynamic vertex buffer that would be amazing, thanks!

Tosh777
Tosh777
So you highlight the rendering of large maps. There is a technique where you can divide the terrain by smaller parts and test if these parts are visible.
If not they are not rendered. This way you can have epicly big terrains and still got lots of fps. If you are interested in this check out frank d. luna's shader approach book chapter 17 if i am not wrong.
Other way of optimising is BSP, which i dont have any experience with it so i cant describe it now.
Believe82
Believe82
Hey I really appreciate the fast helpful replies!

I was wondering are those the two main ways of optimizing the dynamic vertex buffer?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.