Archived

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

nyStagmus

Which is faster?

Recommended Posts

I have loaded a .ms3d file into memory. I am using a local copy of the vertices, a vertex buffer that is updated each frame to animate the model and an index buffer for each group (that is not updated after load-time). Now I am thinking of putting it all into a D3DXMESH8 interface, optimize the mesh and then update the vertex buffer each frame. Is it worth it do you think or should I stick to the way I am doing now?

Share this post


Link to post
Share on other sites
why on earth are you copying the vertex buffer every frame? unless you are dynamically deforming or editing the mesh, stick it in a static VB and use a matrix to move it around every frame

Share this post


Link to post
Share on other sites
I _am_ deforming it each frame to animate the sucker... Do you think I could somehow just send a bunch of matrices to D3D and leave the vb be? The matrices are changed each frame I might add.

Share this post


Link to post
Share on other sites
If you are using skeletal animation you should use vertex shaders with a static VB.

------------------------------------------------------
Cuando miras al abismo el abismo te devuelve la mirada.
F. Nietzsche

Share this post


Link to post
Share on other sites
How do I send the updated matrices to the shader each frame?

*edit* I think I'll have to look a little closer at programmable vertex shaders. *edit*

[edited by - nystagmus on July 18, 2002 1:36:52 PM]

Share this post


Link to post
Share on other sites
Thanks Jim! I''ve done a little reading now on vertex shaders and I believe that they are indeed (much) better. However my initial question, or at least the essence of it, still remains. Would it be better to convert the data to a D3DXMESH8 interface and use Optimize than having my own vertex and index buffers, which are certainly not optimized in any way?

Share this post


Link to post
Share on other sites