Upcoming Events
Unite 2010
11/10 - 11/12 @ Montréal, Canada

GDC China
12/5 - 12/7 @ Shanghai, China

Asia Game Show 2010
12/24 - 12/27  

GDC 2011
2/28 - 3/4 @ San Francisco, CA

More events...
Quick Stats
88 people currently visiting GDNet.
2406 articles in the reference section.

Help us fight cancer!
Join SETI Team GDNet!
Link to us Events 4 Gamers
Intel sponsors gamedev.net search:


 3D File Formats
 The Framework
 X File Class

 Down to the Code

 Source code
 Printable version


  The Series

 The Basics
 First Steps to

 Building Worlds
 With X Files



To make a game, programmers and graphic designers need to work closely together. 3D characters, models and 3D worlds are build and animated in specialized 3D programs, such as 3D Studio MAX, Maya, Lightwave, trueSpace and so on. After building the graphics with such tools, they have to be imported into the game engine.

So if you'd like to be a game programmer, you need to understand how to load a 3D model or world file generated by external tools into your game engine.

As a sample application, I've modified the sample of the second tutorial First Steps to Animations. So you know most of the source and you can concentrate on the new X file code.

To compile the sample program, you have to link with an additional file: d3dxof.lib. It's used by the Framework D3DFile class. If you'd like to know more on compilation of these tutorials, try to take a look in the first Direct3D.net tutorial "The Basics.

I've found the Mr. Gamemaker article Loading X files" very useful. In addition, the book from Robert L. Dunlop Teach Yourself DirectX 7 in 24 Hours published by Sams has a great chapter on using X files in D3D IM. Paul Bourke has compiled a must have for every X file junkie; a DirectX X File Reference.

Next : 3D File Formats