Loading an X file on DirectX 10 without DXUT

Started by
6 comments, last by XVincentX 15 years, 9 months ago
Hi there, The tutorial on loading a mesh from an X file on DirectX 10 mention that "(...)concepts covered here can also be applied without (DXUT) it." I have studied the code on DXUT but still I don't get the picture on how to do it without DXUT, does anyone know a "bare bones" way to load an X file into a ID3DX10Mesh object? Please, just point me to to right direction, because I have studied how to do it with DirectX 9 but that one uses a DirectX 9 Interface (ID3DXMesh) and some functions (D3DXLoadMeshFromX) that have been depprecated on DirectX 10, also, the documentation does not mention any equivalents on DirectX 10. Thank you.
Advertisement
You'll probably need to parse and load the .X file yourself manually.

Failing that, you can always use the DX9 functions to load whatever you need (vertices, indices, etc.), the convert them to DX10 formats.
NextWar: The Quest for Earth available now for Windows Phone 7.
I really do not know why they eliminated this so useful functions.
this link can be useful
http://www.gamedev.net/community/forums/mod/journal/journal.asp?jn=316777&reply_id=2747161
I already know the link.
Anyway, i sent an email to microsoft asking it why they eliminated the functions.
I will post the answer.
Quote:Anyway, i sent an email to microsoft asking it why they eliminated the functions.
I will post the answer.
Hope you get a reply, but don't hold your breath.

The .X format and its related functions have been dying from neglect for years... A lot of customers have their own modelling and content pipelines already so there hasn't been much pressure for MS to create (or extend) yet another file format and yet another library. Creating a unified or standardised mesh and tool library is no small challenge either.

My code (mentioned by Squallc) is probably about the only way you can get this functionality right now...

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

You might also want to try our small library called ASSIMP. It reads .x files as well as a dozen other file formats. It does NOT pack the information into a D3DXMesh, though... that's what you'd have to do for yourself anyways.
----------
Gonna try that "Indie" stuff I keep hearing about. Let's start with Splatter.
Thinking about this, the native X file support encouraged me to create a simple .dae file loader, and i learned a lot of new things about index and vertex buffer.

This topic is closed to new replies.

Advertisement