Jump to content
  • Advertisement

Archived

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

xgamerx81

Optimizing Animation

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

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
Advertisement
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!