Jump to content
  • Advertisement


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


Vertex buffer for each mesh?

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

Would it be unwise to create a vertex buffer for each mesh that I have in a scene? Or would it be better to just keep a buffer of my own design..then when the time comes concatonate them all into one big vertex buffer?

Share this post

Link to post
Share on other sites
if you are just starting out, keep it simple, i.e. as many VBs as there are objects - or for example make an array of the class.

Later you can optimize it and stuff it into one big vertex buffer or into several ones depending on FVF structure and just change the starting vertex and amount being rendered.

The reason for not optimizng from the very beginning is that it is easier to debug and later you shall find out that simple nonindexed vertex buffers are not enough and you`ll switch to indexed vertex buffers. Basically the best (and easiest to implement) is One big vertex Buffer and several dynamic Index Buffers - especially for terrain, or if you have objects placed in 2d grid throughout whole level.

The difference in speed is however tremendous. When I had my terrain divided in about 100 VBs and later did one Big VB with IB, the framarate rose about 200%. So it`s up to you how comfortable are you currently with VBs and IBs.

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!