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

DWORD dwNumMaterials;
LPD3DXBUFFER lpMaterials;
LPD3DXMESH lpMeshBody;

And the call to D3DLoadMeshFromX is here:


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.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.