Jump to content
  • Advertisement
Sign in to follow this  
rmlin

Looking for example of X file parser

This topic is 4519 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 am a learner on DirectX. I want to parse X file, but I have only examples code based on DX8. It can not work properly in DX9. I tried to modify it but failed. If someone knows where to get an example, please help me. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Hi,

if you are programming in c# here is a very good site: http://www.tar.hu/directx9kick/index.html eveything is explained from the beginning, how to load a mesh from a file....

Share this post


Link to post
Share on other sites
Thanks for your information.

But I am looking for a C++ example.
And the C# example seems like just loaded a file as a whole(I have not learned C#,just a guess).

I want to load parts of a X file,so I need to parse the X file.

I have changed a DX8 Example to use DX9 classes,but it do not work.

ID3DXFile *pDXFile = NULL;
ID3DXFileEnumObject *pDXEnum = NULL;
V_RETURN( ( D3DXFileCreate(&pDXFile)));
V_RETURN( ( pDXFile->CreateEnumObject("tiny.x",D3DXF_FILELOAD_FROMFILE,&pDXEnum) ));
........

I got an error Code when calling CreateEnumObject(): hr=D3DXFERR_PARSEERROR (0x88760390)
The same .x file can be parsed correctly use DX8 example executable file, it's an example x file from microsoft.

Share this post


Link to post
Share on other sites
Hi,

here I found this topic, I don't know if you have seen it. The guy has quite the same problem as you do: http://www.gamedev.net/community/forums/topic.asp?topic_id=398970. Apparently it has something to do with the templates.

Share this post


Link to post
Share on other sites
I have resolved the problem. Thanks a lot!

I should have come here earlier to get help. :)
How I envy you people whose native language is English! I can not get any help in Chinese.

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!