What happened to ID3DXSkinMesh?
Hello fellas,
I'm converting Jim Adams' "Programming Role Playing Games with DirectX" 8.0 book to 9.0 (Feb 2006 SDK). So far everything has went good, but I can't solve a prob concerning Skinned Meshes (m_SkinnedMesh), ID3DXSkinMesh.
What happened to ID3DXSkinMesh and what do I use now? I'm not quite sure I'm going to use bones in my project but SkinnedMesh = Mesh with bones?
My .X parsing code does compile but I doubt it's correct. So, does anybody know about a tutorial on parsing .x files which will work with the latest DirectX SDK? They changed a lot this update.
Greetings,
IlyaZ
Hey, I had just done the work that converting the XInternalParser from DX8.0 to DX9.0.
I also doubt it's correct that I add some "DrawText" function
to display those frames and matrices.
Something to note is that you need to change the code in
ParseObject() to tell whether the childobject is an
instance or referenced.
DWORD cchildren = 0;
pDXData->GetChildren(&cchildren);
if(cchildren){
for(DWORD cc =0; cc<cchildren; cc++){
pDXData->GetChild(cc, &pDXChildData);
ParseObject(pDXChildData, pDXData, Depth+1, Data, Reference | pDXChildData->IsReference());
ReleaseCOM(pDXChildData);
}
}
Hope this helps.
I also doubt it's correct that I add some "DrawText" function
to display those frames and matrices.
Something to note is that you need to change the code in
ParseObject() to tell whether the childobject is an
instance or referenced.
DWORD cchildren = 0;
pDXData->GetChildren(&cchildren);
if(cchildren){
for(DWORD cc =0; cc<cchildren; cc++){
pDXData->GetChild(cc, &pDXChildData);
ParseObject(pDXChildData, pDXData, Depth+1, Data, Reference | pDXChildData->IsReference());
ReleaseCOM(pDXChildData);
}
}
Hope this helps.
Actually, you don't need to use the new ID3DXFile interface at all anymore. You can use the D3DXLoadMeshHierarchy function and the AllocateHierarchy functions to do the work now.
The ID3DXSkinMesh interface is gone. Now you will use the D3DX function to load the ID3DXMesh and the ID3DXSkinInfo, and use the later interface to skin the mesh with the bone data (ID3DXSkinInfo::ConvertToIndexedBlendedMesh).
However, a cool sample to the ID3DXFile interface is here:
TripleBuffer
The ID3DXSkinMesh interface is gone. Now you will use the D3DX function to load the ID3DXMesh and the ID3DXSkinInfo, and use the later interface to skin the mesh with the bone data (ID3DXSkinInfo::ConvertToIndexedBlendedMesh).
However, a cool sample to the ID3DXFile interface is here:
TripleBuffer
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement