Jump to content
  • Advertisement
Sign in to follow this  
Medo Mex

D3DXSaveMeshHierarchyToFile() Failing

This topic is 1907 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

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
Advertisement

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;
  LPD3DXEFFECTINSTANCE pEffects;
  DWORD                NumMaterials;
  DWORD                *pAdjacency;
  LPD3DXSKININFO       pSkinInfo;
  D3DXMESHCONTAINER    *pNextMeshContainer;
} D3DXMESHCONTAINER, *LPD3DXMESHCONTAINER;
 

Share this post


Link to post
Share on other sites
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!