Original Post
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!
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!