Jump to content
  • Advertisement


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


What is the best way to manage the Vertix Buffer ?

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

Hi all, I would like to know what is the best way to manage the vertix buffer. As I know, we should try to use one VertixBuffer to do the rendering job. That mean all the Modle or Polygon with same vertix format should place in one VertixBuffer.But should i reload all the vertix information in the VertixBuffer in each rendering call? And is it a good and correct way to do the rendering job ? Thanks. ^-^

Share this post

Link to post
Share on other sites
I can just tell you waht I do - I do NOT put everything into one vertex buffer. I try to keep the number of buffers as small as possible, but I also am realistic in terms of AGB etc. bandwidth usage.

I would say: use them SMART. Especially with more modern versions of Dx (9), vertex buffer changes are cheaper. Still nothing to have hundreds of.

I am playing with rendering terrain, for example, in the context of something that hopefully will be a 3d engine one day. I have one vertex buffer that handles all the patches of terrain I am rendering - up to 255 of them. I normally render around 61 of them per frame. I use a dynamic vertex buffer, which is organised as a LRU cache - vertex info is added overwriting slots not used for the longest time. I consider this to be superior, by far. When turning, or moving backwards - cache slots still have the data needed, so no upload, data calulation has to take place. Patches, btw., are 33x33 vertices - so we talk of a good amount of data here. I thought of actually making the cache bigger, though :-)

WHen I will add other stuff to the engine (in a second step), this will definitly go into a separate (or "a number of separate") Vertex Buffers. Propably one for a generic paticle engine (again with a LOT of cache memory), one for every COMPLEX model type (with GPU based animation). I just try to keep the VB number relatively small - no problem, though, with having 20 or so buffers around.


Thomas Tomiczek
THONA Consulting Ltd.
(Microsoft MVP C#/.NET)

Share this post

Link to post
Share on other sites
For some wrappers for efficient use of vertex buffers, check this out at Nvidia. If you don''t need wrappers then take a look for a good example.


Homepage: http://students.washington.edu/andrey

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!