Sign in to follow this  
Medo Mex

D3DXSaveMeshHierarchyToFile() Failing

Recommended Posts

Whenever I try to save .x file using D3DXSaveMeshHierarchyToFile() it fail and I get the following error message in the output window:

"D3DX: D3DXSaveMeshToXof: Non-zero material count when material and effect array is NULL"


What is going wrong?

Edited by Medo3337

Share this post

Link to post
Share on other sites

You must be specifying a non-zero material count in at least one of your mesh containers, however the actual array of materials (pMaterials) and effects (pEffects) are NULL (0).


typedef struct D3DXMESHCONTAINER {
  LPSTR                Name;
  D3DXMESHDATA         MeshData;
  LPD3DXMATERIAL       pMaterials;
  DWORD                NumMaterials;
  DWORD                *pAdjacency;
  LPD3DXSKININFO       pSkinInfo;
  D3DXMESHCONTAINER    *pNextMeshContainer;

Share this post

Link to post
Share on other sites

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