Loading DirectX files with D3DXLoadSkinMeshFromXof()
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]
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.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement