Jump to content
  • Advertisement
Sign in to follow this  

ID3DXFileData::GetType Method -problem Solved

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

Hi, I'm trying to get an xfile template type in English, such as TID_D3DRMFrame. When using ID3DXFileData::GetType the return is; GUID tpType; //xfile data object p_XFileData->GetType( &pType ); //this is the result printed to a text file. pType.Data1 = 1031973709 pType.Data2 = 25306 pType.Data3 = 4559 pType.Data4 = «9 //should be an 8 byte char array This should be a material, so I was hoping to get TID_D3DRMaterial, instead I got that. Does any one know what is happening here? Also what is the difference between ID3DXFileData::GetType and ID3DXFileData::GetId. Also while I'm asking, when trying to make an xfile loader (for just loading xfiles, not 3ds files or anything), how do you register the templates, do you still use your xfile object as in; pXFile->RegisterTemplates((LPVOID)D3DRM_XTEMPLATES, 3278*sizeof(BYTE)); Or do you also have to register each one by hand as a string or something, in the docs the example is;
//from the docs (summer 2004 update)

//Edit sorry the code won't fit in the window, but it's the code sample at
//the bottom of;
//Directx Graphics / Reference / XFile Referance / Interfaces / ID3DXFile / RegisterTempltes

if ( FAILED 
        (hr = pD3DXFile->RegisterTemplates( 
            sizeof( XSKINEXP_TEMPLATES ) - 1 ) ) )
    goto End;
Thanks for any help with this Edit ok I discovered in the debugger that I do get the right type returned, the debugger lists it as pType{3D82AB4D-62DA-11cf-AB39-0020AF71E433} which is the right type, but I still want to get it as TID_D3DRMaterial, so I can check what the type is for loading, unless theres another way? Thanks solved I must have been having problems with including rmxfguid.h in the right place. To check the template i just used if(pType == TID_D3DRMMaterial) etc and it seems to work. [Edited by - Stevieboy on January 3, 2005 7:52:36 PM]

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!