Memory allocation strategy for the vertex buffers (DirectX 10/11)

Posted by Alex on Game Development See other posts from Game Development or by Alex
Published on 2012-03-27T10:55:39Z Indexed on 2012/03/27 11:40 UTC
Read the original article Hit count: 214

Filed under:
|
|

I have the following question. I write CAD system. So I have a 3D scene and there are many different objects (walls, doors, windows and so on). User can add or delete some objects. The question is: how can I organise the keeping of vertices for all my objects. I can create vertex buffer for every object. But I think drawing/switching from one buffer to another would have performance penalty. Another way - I can create several big buffers for every object type. But I don't understand how to update such buffers. It is too big to update whole buffer (for example buffer for all walls). What I need to do if I want to delete the object from the middle of the buffer? Actually I have the similar question: http://stackoverflow.com/questions/5515700/how-to-properly-update-vertex-buffers-in-directx-10 Most examples I've found work with very static models. Therefore, they tend to create a single vertex buffer with their list of points, and then are just manipulated by matrix transformations. I, on the other hand, will be updating the scene very often.

© Game Development or respective owner

Related posts about directx10

Related posts about vertex