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

D3DXSaveMeshHierarchyToFile() Failing

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

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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!