Jump to content
  • Advertisement
Sign in to follow this  
akira32

D3DXLoadSkinMeshFromXof parameter problem

This topic is 4326 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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!