Jump to content
  • Advertisement
Sign in to follow this  
JakeM

Parsing X files

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

I understand that, for DirectX 9.0, D3DXLoadMeshHierarchyFromX() will load the entire DirectX file with animation sets. No parsing required. However, I would like to convert the parsing code for DirectX 8.0, found here: http://www.gamedev.net/reference/articles/article1493.asp to DirectX 9.0. For DirectX 8.0, they use variables:
 LPDIRECTXFILE           pDXFile  = NULL;
 LPDIRECTXFILEENUMOBJECT pEnumObj = NULL;
 LPDIRECTXFILEDATA       pData    = NULL;
which is replaced with:
 LPD3DXFILE           pDXFile   = NULL;
 LPD3DXFILEENUMOBJECT pEnumObj  = NULL;
 LPD3DXFILEDATA       pFileData = NULL;
for DirectX 9.0. Some parts are easy to convert, but, there is one part that is giving me trouble. I'm getting errors that Resolve() doesn't accept the ID3DXFileData file type. I'm not sure if I really need this code or not. Throw it all out?
    // Process embedded references
    if(SUCCEEDED(pSubObj->QueryInterface(IID_IDirectXFileDataReference, (void**)&pDataRef))) {
      if(SUCCEEDED(pDataRef->Resolve(&pSubData))) {
        ParseXFileData(pSubData);
        ReleaseCOM(pSubData);
      }
      ReleaseCOM(pDataRef);
    }

    // Process non-referenced embedded templates
    if(SUCCEEDED(pSubObj->QueryInterface(IID_IDirectXFileData, (void**)&pSubData))) {
      ParseXFileData(pSubData);
      ReleaseCOM(pSubData);
    }
    ReleaseCOM(pSubObj);
Or perhaps if this code is already converted to DX 9.0 somewhere, please post a link and save me the trouble!

Share this post


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