Hi
ive used the DXUTIL to initialise my prog and load an animated X file(Tiny.X)
but when i call D3DXLoadMeshFromX to load my map mesh it fails. help ...
Hi
ive used the DXUTIL to initialise my prog and load an animated X file(Tiny.X)
but when i call D3DXLoadMeshFromX to load my map mesh it fails. help ...
DXUT and D3DXLoadMeshFromX
Zorpiedoman
Im using the summer 2004 SDK.
basically i have opened the skinned mesh example and added this code in oncreatedevice():
LPD3DXBUFFER pD3DXMtrlBuffer;
LPDIRECT3DDEVICE9 pD3D = LPDIRECT3DDEVICE9(DXUTGetD3DDevice());
// Load the mesh from the specified file
HRESULT D3DOK = D3DXLoadMeshFromX( LPCWSTR("Road.x"), D3DXMESH_SYSTEMMEM,
pD3D, NULL, &pD3DXMtrlBuffer, NULL, &g_dwWorldNumMaterials, &g_pWorldMesh );
if (D3DOK == D3DERR_INVALIDCALL){
MessageBox(NULL, L"Could not load Road.X\nInvalid Call", L"Project#001.exe", MB_OK);
return E_FAIL;
}
if( D3DOK == E_OUTOFMEMORY){
MessageBox(NULL, L"Could not load Road.X\nOut of Memory", L"Project#001.exe", MB_OK);
return E_FAIL;
}
if ( D3DOK != D3D_OK){
MessageBox(NULL, L"Could not load Road.X\nUnknown Error", L"Project#001.exe", MB_OK);
return E_FAIL;
}
It always fails to open the mesh, However it dosent return a valid value according to the documentation. I get my unknown error box. Is there another method for DXUT
BobMaupin
Scarlett
budcan76
How about some more detail
What is the error you get What SDK version are you loading Etc.
Please read this before posting more questions: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=69462&SiteID=1