With the dropped support of the .X file format in DirectX 10, getting your Blender content into a DirectX app became hard or even impossible. Clemens Fehr has published C++ code that reduces this task to:
WorldObject *o = new WorldObject();
LoadBlenderFile("file.blend", &o->mesh, o->mtrls, o->textures, UV_DuplicateVertex);
Clemens writes:
In DirectX 9 there was built in support for the .X file format. You could easily load .X files with a few lines of code. This looked like the format of choice because .X files are supposed to be supported by almost all 3D tools like blender, 3ds Max and a lot of free or low cost tools.
You see the problems once you actually begin to work with .X files. I never got Blender to export .X files that would work with DirectX right away. Either the mesh data was wrong, normals were incorrect, orientation was mangled or UV coordinates didn’t work. To get a model to show up in my 3d app I had to export in blender to .3ds without uv mapping, then do the uv mapping in another tool, then finally export the uv mapped model from that tool to .X file format. And this approach didn’t even work reliably.
The final nail in the coffin for the .X file format came from Microsoft themselves: They completely abandoned .X file format support in DirectX 10.
The whole thing really got to my nerves. I wanted to try out 3d stuff graphically, not waste my time with file formats and imports/exports. At one time I thought about actually buying 3dsMax, but the cost was just too high. And even if their exporter would produce a X file I could import with DirectX 9 I would have problems switching my app to DirectX 10. Also, I felt bad to rely on an abandoned technology.
At some time I realized that there was no ready solution out there that would suit my needs completely. I wanted to stick to Blender so the only solution I saw was getting my hands dirty and do something on my own.
Link
