Syntax Error in Implementing Skin Meshes article src code?
Ok I havent read this article on gamedev yet, but before doing so i thought i would try running the src code. but it wouldnt even compile.. is it just me or there is a syntax error in the src code?
Slow and steady wins the race.
What''s the error? Can you post the error msg from your compiler as well as some of the lines it happens on?
Error:
CMeshNode.cpp
D:\Documents and Settings\Administrator\Desktop\dx8skin\CMeshNode.cpp(181) : error C2660: 'ConvertToBlendedMesh' : function does not take 6 parameters
This is the line where the error occurs:
// blend the mesh
result = pD3DXSkinMesh->ConvertToBlendedMesh( D3DXMESH_WRITEONLY, padjacencyin,
rgiAdjacency, &dwAttrCount, &pBoneCombinationBuf, &pD3DXBlendedMesh );
'ConvertToBlendedMesh' This method takes in 8 parameters not 6
Slow and steady wins the race.
[edited by - krad7 on June 7, 2002 12:41:59 PM]
CMeshNode.cpp
D:\Documents and Settings\Administrator\Desktop\dx8skin\CMeshNode.cpp(181) : error C2660: 'ConvertToBlendedMesh' : function does not take 6 parameters
This is the line where the error occurs:
// blend the mesh
result = pD3DXSkinMesh->ConvertToBlendedMesh( D3DXMESH_WRITEONLY, padjacencyin,
rgiAdjacency, &dwAttrCount, &pBoneCombinationBuf, &pD3DXBlendedMesh );
'ConvertToBlendedMesh' This method takes in 8 parameters not 6
Slow and steady wins the race.
[edited by - krad7 on June 7, 2002 12:41:59 PM]
quote:Original post by Anonymous Poster
To compile your example under DirectX 8.1 you need to make a couple of changes to CMeshNode.cpp:
add
DWORD* face_remap = new DWORD[dwfacecount];
LPD3DXBUFFER vertex_remap;
result = D3DXCreateBuffer( dwfacecount, &vertex_remap );
change:
// blend the mesh
result = pD3DXSkinMesh->ConvertToBlendedMesh(MESH_WRITEONLY, padjacencyin, rgiAdjacency, &dwAttrCount, &pBoneCombinationBuf, face_remap, &vertex_remap, &pD3DXBlendedMesh );
add:
delete face_remap;
SAFERELEASE( vertex_remap );
Thanks for the article this stuff sure is confusing!
With these changes the source works fine on my PC.
I'm using DirectX SDK 8.1 too.
[edited by - andrew programmer on June 7, 2002 7:14:55 PM]
Or change the CMeshNode::GenerateMesh to have the following where the "Blend the mesh" comment is:
result = pD3DXSkinMesh->ConvertToBlendedMesh(
D3DXMESH_WRITEONLY,
padjacencyin,
rgiAdjacency,
&dwAttrCount,
&pBoneCombinationBuf,
NULL,
NULL,
&pD3DXBlendedMesh );
result = pD3DXSkinMesh->ConvertToBlendedMesh(
D3DXMESH_WRITEONLY,
padjacencyin,
rgiAdjacency,
&dwAttrCount,
&pBoneCombinationBuf,
NULL,
NULL,
&pD3DXBlendedMesh );
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement