Problem loading an X File

I'm trying to break into the world of game development, but I'm having a spot of trouble with creating my own content and I don't know where else to ask for help. I have a sample engine and I'm using 3ds Max to create a custom level, I'm using the Panda Exporter to export to a .x and I've used it on the sample .max file the engine author provided, so I know the issue is not the exporter settings.

The problem occurs when I call D3DXLoadMeshHierarchyFromX, the frame pointer I pass in comes back null. Can anyone tell me why this might occur, or point me to some good reference material for Frames and Hierarchies Thank ya.



Answer this question

Problem loading an X File

  • IngJVV

    The way the engine is set up, it renders animated and non-animated objects alike through one Mesh class, but splitting the pipeline like you suggested would probably save me quite a bit of grief, I'll give it a shot, thanks!

  • shunm_ms

    You created a level in 3dsMax. If this is the case you wouldn't really have any animation in it since levels are mostly just static objects. I would suggest you trying something like this

    ID3DXMesh* pMesh;
    ID3DXBuffer* pMtrlData;
    ID3DXBuffer* pAdjBuffer;
    ID3DXBuffer* pEffectsBuffer;
    DWORD* pNumMtrls;
    D3DXLoadMeshFromX("yourMesh.x", D3DXMESH_MANAGED, pDevice, &pAdjBuffer, &pMtrlData, &pEffectsBuffer, pNumMtrls, &pMesh);

    I hope this helps.
    Take care.


  • Problem loading an X File