954,500 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Generic Error Loading Direct3D Meshes

I have the following globals defined (the relevant ones, anyway):

DWORD dwNumMaterials;
LPD3DXBUFFER lpMaterials;
LPD3DXMESH lpMeshBody;

And the call to D3DLoadMeshFromX is here:

D3DXLoadMeshFromX(L"body.x",
		  D3DXMESH_SYSTEMMEM,
		  lpD3DDevice,
		  NULL,
		  &lpMaterials,
		  NULL,
		  &dwNumMaterials,
		  &lpMeshBody);

When this is called, it returns a generic error (0x80004005). Also, if it is needed I can post more code. Any ideas on what I did wrong? And yes, body.x does exist in the program's path.

death_oclock
Posting Whiz
393 posts since Apr 2006
Reputation Points: 129
Solved Threads: 45
 

It would seem my .x file was invalid. It works fine with another file I downloaded...

death_oclock
Posting Whiz
393 posts since Apr 2006
Reputation Points: 129
Solved Threads: 45
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You