Archived

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

skallio

Vertex Buffers..

Recommended Posts

I read some posts here about vertex buffers and read the white papers on nVidia homepage... Now I''m wondering if the best configuration is really to put up 2 VB''s - one to handle all static data and one for all dynamic. They said something about the good average vertex count on a VB (10000-20000), but what if that is not enough? Should I create another VB or something? And - if I''m doing a landscape engine is it a good idea to put all landscape vertices into it''s own VB, or should I put them too into the main static VBs? Thanks in advance. (Sorry about my bad english)

Share this post


Link to post
Share on other sites
As I''ve implemented it (and this is probably far from perfect, as I''m not an expert), I have a single VertexBuffer (and an IndexBuffer to go with it) that is reused. I fill it up with the vertices for a given texture/material, render, reset the texture/material and render the next bunch of triangles (those using the new texture).

I''d imagine using one for static objects would be good in some cases as well, though I''m not doing that.

So, a single VertexBuffer, being reused many times within a given render call.

Good luck!
Onnel

Share this post


Link to post
Share on other sites