Jump to content
  • Advertisement
Sign in to follow this  
JakeM

Loading DirectX files with D3DXLoadSkinMeshFromXof()

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

When D3DXLoadSkinMeshFromXof() is called for DX9, it returns several parameters including pSkinInfo and pSkinMesh. Question is, if pSkinMesh is changed in anyway afterwards, such as calling CloneMeshFVF, and changing the FVF parameters, and if I plan to replace pSkinMesh with a new mesh by justing releasing the old one, does anything need to be done to pSkinInfo? Are there are any 'internal associations' between these two structures that can be broken or need to be updated? [Edited by - JakeM on November 27, 2006 3:56:22 PM]

Share this post


Link to post
Share on other sites
Advertisement
If you call any function that alters the vertex buffer, you gotta save the buffer that gets returned and pass it into the pSkinInfo::Remap method. Since the pSkinInfo interface maps each bone to the vertices (the vertice's offset in the vertex buffer) each bone influences, you gotta keep them in sync.

Share this post


Link to post
Share on other sites
Thanks, I stumbled across two interesting points, one you mentioned. ID3DXSkinInfo has
two functions called SetFVF() and Remap(). The SDK docs say to use Remap() after the
function Optimize() is called. And I also noticed that both pSkinInfo and pSkinMesh
have the same FVF flags after D3DXLoadSkinMeshFromXof() is called. However, if I use
CloneMeshFVF() on pSkinMesh, pSkinInfo's FVF flags remain the same. I haven't seen
any docs mentioning FVF flags, but I also set pSkinInfo so it's the same too.

Share this post


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

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!