Sign in to follow this  

How to draw multiple objects with Direct3D?

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

Lately, I've been trying to draw multiple objects with Direct3D and I just don't understand how I'm supposed to draw different objects on the screen with multiple vertex buffers. On MSDN, I read that a GPU could only hold 16 vertex buffers, so creating one vertex buffer per object doesn't make much sense to me. I know it is possible to put many static meshes into a single vertex buffer, but since mine are dynamic, how am I supposed to do that?

Share this post


Link to post
Share on other sites


On MSDN, I read that a GPU could only hold 16 vertex buffers... [within each draw call].
You can make use of 16 buffers simultaneously -- as in, when drawing one object, you can read data from up to 16 buffers.

The next object can use the same buffer(s), or a completely different set of 0-16 buffers.

Share this post


Link to post
Share on other sites

For each of my game objects every frame I add an entry in a list of renderables. Renderables are just a structure storing information about the object, like its vertex/index buffers, materials, sorting parameters, etc. and every frame I iterate through the list and draw them one at a time, setting the vertex buffer for each one when I draw it.

Share this post


Link to post
Share on other sites
Sign in to follow this