Jump to content

  • Log In with Google      Sign In   
  • Create Account


D3DXLoadSkinMeshFromXof Question


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 lucky6969b   Members   -  Reputation: 585

Like
0Likes
Like

Posted 03 February 2014 - 03:26 AM

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



Sponsor:

#2 Buckeye   Crossbones+   -  Reputation: 4340

Like
0Likes
Like

Posted 03 February 2014 - 08:58 AM

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.


#3 lucky6969b   Members   -  Reputation: 585

Like
0Likes
Like

Posted 03 February 2014 - 04:01 PM

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



#4 Buckeye   Crossbones+   -  Reputation: 4340

Like
0Likes
Like

Posted 03 February 2014 - 05:07 PM

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, 03 February 2014 - 05:14 PM.

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


#5 ankhd   Members   -  Reputation: 1209

Like
0Likes
Like

Posted 06 February 2014 - 01:53 AM

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.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS