PDA

View Full Version : DirectX *.X file parser



chronozphere
17-02-2007, 07:48 PM
Hi everyone :)

I'm looking for some tutorials/examples that show me how to parse X files. I already looked for a 'file type specification', but it's HUGE and implementing it will probably be a pain in the ass. :(

I allready succeeded in loading X files in my engine, but i want more.
I want to load the hierarchy into my object engine, and with some luck even add some templates. :)

So my questions are:

>Is there any source/tutorial available wich covers X loading??
>Where to find a list of the 'default' templates?? (I dont want to reinvent the wheel).

Thank you. ;)

chronozphere
23-02-2007, 04:32 PM
so... None of you guys ever parsed an X file?? :?

AthenaOfDelphi
23-02-2007, 06:48 PM
Hi chronozphere,

I've not done it, I may be stating the obvious, but DelphiX loads .X files.... is it worth having a look at that (the unit is D3DFile.pas)?

Clootie
25-02-2007, 11:31 AM
Default templates can be found, for example, in D3DX9 headers - XEXTENSIONS_TEMPLATES (and others). But I warn you to think twice before tieing yourself to .X file format. Newest SDK from MS switched to more streamlined (and not so generic) ".SDKMesh" format.

And .X always was more "intermediate" format than production one. It's easy to use it while in development because of it's flexibility, but loading and pasring all this stuff in production code...