Archived

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

DangerDave

How many vertex buffers?

Recommended Posts

I''ve just made my first crappy lil demo thing in direct3d. The way I''ve implemented vertices is by storing each object''s vertices in its own vertex buffer, then for-looping through each object, calling SetMaterial and SetStreamSource with the objects material and vertex buffer and then DrawPrimitive before moving onto the next object. Is this the best way of doing things? i.e. having a vertex buffer associated with each object, or would it be better to use the offset parameters and just have one vertex buffer, or some combination of the two? Am I making any sense? Dave.

Share this post


Link to post
Share on other sites
Fit as many (reasonable) vertices as you can into a vertex buffer. 2-4 MB worth is recommended, as it allows the driver to move things around and make it fit properly. It''s ok if you have a few without many vertices, but definately don''t have one for every object.

Share this post


Link to post
Share on other sites

Reference on this site..

http://www.gamedev.net/reference/articles/article1946.asp

Stuff at nvidia

http://developer.nvidia.com/docs/io/4000/BatchBatchBatch.pdf

http://developer.nvidia.com/docs/io/4000/GDC2003_PipelinePerformance.pdf






Of all the things that I have lost, it is my mind that I miss the most!

Share this post


Link to post
Share on other sites