• Advertisement
Sign in to follow this  

D3DXLoadSkinMeshFromXof Question

This topic is 1446 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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*.

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites
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).

Edited by Buckeye

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement