Sign in to follow this  

D3DXLoadSkinMeshFromXof parameter problem

This topic is 4109 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

HRESULT LoadMesh(D3DXMESHCONTAINER_EX **ppMesh, IDirect3DDevice9 *pDevice, IDirectXFileData *pDataObj, char *TexturePath, DWORD NewFVF, DWORD LoadFlags) { ID3DXMesh *pLoadMesh = NULL; ID3DXSkinInfo *pSkin = NULL; HRESULT hr; // Error checking if(!ppMesh || !pDevice || !pDataObj || !TexturePath) return E_FAIL; // Use system memory if converting FVF DWORD TempLoadFlags = LoadFlags; if(NewFVF) TempLoadFlags = D3DXMESH_SYSTEMMEM; // Load the mesh using the D3DX skinned mesh interface ID3DXBuffer *MaterialBuffer = NULL, *AdjacencyBuffer = NULL; DWORD NumMaterials; if(FAILED(hr=D3DXLoadSkinMeshFromXof(pDataObj, TempLoadFlags, //problem line pDevice, &AdjacencyBuffer, &MaterialBuffer, NULL, &NumMaterials, &pSkin, &pLoadMesh))) return hr; Direct3D.cpp e:\BookCode\Common\Direct3D.cpp(314) : error C2664: 'D3DXLoadSkinMeshFromXof' : cannt translate parameter 1 from 'IDirectXFileData *' to 'LPD3DXFILEDATA' ;translation must have reinterpret_cast、C-style (sorry!I use VC++.Net 2003 china tradition,so the information seem to strange) I had modified my code as below,but when I start run,it will break down(compile ok).What should I modify the code? if(FAILED(hr=D3DXLoadSkinMeshFromXof(reinterpret_cast<LPD3DXFILEDATA>(pDataObj), TempLoadFlags, pDevice, &AdjacencyBuffer, &MaterialBuffer, NULL, &NumMaterials, &pSkin, &pLoadMesh))) My Program code is from "Advanced Animation with DirectX"'s Chapter5 sample. If I use the DirectX Version of this book, compile and run are all right. But I Use DirectX April 2006,the problem as above will appear. PS:I use VC++.Net 2003 for Compile. PS:Source Code I put at the web http://bbs.gameres.com/showthread.asp?threadid=63977

Share this post


Link to post
Share on other sites

This topic is 4109 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this