Game Programming and Development Tools

YADXP: Yet another DirectX problem =) – Sturmritter

Sturmritter

Member

Posts: 17
From: San Rafael, CA, USA
Registered: 06-13-2002
Well, not really a problem for me, just my compiler

I'm using DirectX to Assign Skin Meshes to a model I'm working on, but the compiler is giving me a strange error.

Here is the SDK information on the COM Interface:

ID3DXSkinMesh::UpdateSkinnedMesh
Updates a skin mesh.

HRESULT UpdateSkinnedMesh(
CONST D3DXMATRIX* pBoneTransforms,
LPD3DXMESH pMesh
);

Parameters
pBoneTransforms
[in] Pointer to an array of D3DXMATRIX structures, representing the new bone transforms. The length of this array is the count of all the bones in the skin mesh.
pMesh
[out, retval] Pointer to an ID3DXMesh interface, representing the updated skinned mesh.
Return Values
If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be D3DERR_INVALIDCALL.

Remarks
This method updates the vertices blended with the new bone transforms.

Requirements
Header: Declared in D3dx8mesh.h.
Import Library: Use D3dx8.lib.

See Also
ID3DXSkinMesh::GenerateSkinnedMesh


Now here is my code and the resulting compiler error:

SkinMesh->UpdateSkinnedMesh(Matrix, Mesh->PropMesh);

(SkinMesh is a LPD3DXSKINMESH pointer, PropMesh is the LPD3DXMESH pointer I want returned to my Mesh Structure)

The Compiler tells me the function doesn't take 2 parameters!! What's up with this?!?

error C2660: 'ID3DXSkinMesh::UpdateSkinnedMesh' : function does not take 2 parameters

Can anyone help me with this? I'm at a loss.

Thanks in advance and God Bless!

Sturmritter

------------------

quote:
...in the immortal words of Socrates who said, "I drank WHAT?!?!?"
Sturmritter

Member

Posts: 17
From: San Rafael, CA, USA
Registered: 06-13-2002
Go figure! It was the compiler after all! (or at least the SDK information provided by it!)

With DirectX 8.1 The UpdateSkinnedMesh function requires THREE parameters:

HRESULT UpdateSkinnedMesh(
CONST D3DXMATRIX* pBoneTransforms,
NULL,
LPD3DXMESH pMesh
);

They probably added the NULL as some future COM hook/parameter return function yet to be added.

Anyways, that solved the problem. I just wish they'd update the SDK help files more often!

God Bless and take care. Hope this helps anyone else who might encounter a similar problem.

- Sturmritter

------------------

quote:
...in the immortal words of Socrates who said, "I drank WHAT?!?!?"
rowanseymour

Member

Posts: 284
From: Belfast, Northern Ireland
Registered: 02-10-2001
The online SDK docs for 8.1 have the updated function params

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dx8_c/directx_cpp/dx8start_c_81.asp

------------------
Rowan / GODCENTRIC Christian Demoscene

Sturmritter

Member

Posts: 17
From: San Rafael, CA, USA
Registered: 06-13-2002
Thanks Rowan!

- Sturmritter

------------------

quote:
...in the immortal words of Socrates who said, "I drank WHAT?!?!?"