D3DXLoadSkinMeshFromXof Question

Started by
3 comments, last by ankhd 10 years, 3 months ago

Hello everyone,

I got a pretty old book called

Advanced Animation with DirectX by Jim Adams.

And in the source code provided,

I have some problems compiling the ParseFrame example,

with this line

 if(FAILED(hr=D3DXLoadSkinMeshFromXof( pDataObj, TempLoadFlags,
                                       pDevice, &AdjacencyBuffer,
                                       &MaterialBuffer, &effectInstance,
                                       &NumMaterials, &pSkin,
                                       &pLoadMesh)))

Here, pDataObj is a pointer of type IDirectXFileData *

The interface of the most current version of DirectX9 of this object

seemed to be changed.

Now, my question is how do I fix this code to make it compile for VS2010 x64

Any help would be greatly appreciated!

Thanks

Jack

Advertisement

First, I haven't used D3DXLoadSkinMeshFromXof myself. I use D3DXLoadMeshHierarchyFromX.

In the current docs for D3DXLoadSkinMeshFromXof, it uses the newer LPD3DXFILEDATA for the input object. LPD3DXFILEDATA is just a typedef for ID3DXFileData*.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

First, I haven't used D3DXLoadSkinMeshFromXof myself. I use D3DXLoadMeshHierarchyFromX.

In the current docs for D3DXLoadSkinMeshFromXof, it uses the newer LPD3DXFILEDATA for the input object. LPD3DXFILEDATA is just a typedef for ID3DXFileData*.

Hello Buckeye,

I tried to cast pDataObj to LPD3DXFILDATA, but they are not compatible which gave me some runtime errors..

they are not compatible which gave me some runtime errors..

Not too surprising. You can't cast an apple as an orange and hope the juicer will somehow make orange juice.

Take a look at the docs. It appears you need to use (a pointer to ) ID3DXFileData (not IDirectXFileData) as your input object. Unless you have a ten year old SDK installed, the API you're using today isn't the same one that Adam's assumes (assuming you're talking about Adam's 2003 book).

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

hello skip that function if you read the book more he show how to load one.

that is way better then that function. I have the book as well very good book indeed.

This topic is closed to new replies.

Advertisement