Archived

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

xgamerx81

Optimizing Animation

Recommended Posts

Hi, I''ve got a skeletal animation system set up, and I am trying to optimize the drawing of the mesh. Right now, I use a DrawPrimitive call for each triangle. This obviously isn''t optimal. I can''t really make a vertex buffer, because the vertices are always changing. It would work, but I need a copy of the original vertices, otherwise I can''t animate correctly. I guess I could make a vertex buffer with the animated vertices, and then keep the original vertices stored seperately. That requires twice the memory, but would probably be faster.... Anyone have any better ideas? =D

Share this post


Link to post
Share on other sites
You can use on call to DrawIndexedPrimitiveUP for the whole mesh to draw it from vertices / indices in system memory. This is likely faster than doing it one triangle at a time, but keeping a copy of the vertex buffer and locking and copying only updated sections as necessary is likely faster still.

Share this post


Link to post
Share on other sites