XNA ModelMesh.Draw vs GraphicsDevice.DrawIndexedPrimitives

Posted by cubrman on Game Development See other posts from Game Development or by cubrman
Published on 2013-08-23T05:35:01Z Indexed on 2013/11/04 16:14 UTC
Read the original article Hit count: 232

Filed under:
|
|

I am using XNA 4.0 and I wonder if drawing models with multiple meshes is better by filling the vertex and index buffers first and calling GraphicsDevice.DrawIndexedPrimitives() or by simply using good ol' foreach(...) {ModelMesh.Draw()}.

Is it possible to add data to vertex/index buffers at all in order to pack all the models on the scene in them and then call Draw only once per frame?

I would appreciate a link to an in-depth explanation. Thanks.

© Game Development or respective owner

Related posts about XNA

Related posts about 3d