Jump to content
  • Advertisement
Sign in to follow this  
Matruz

Loading an X file on DirectX 10 without DXUT

This topic is 3631 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

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
this link can be useful
http://www.gamedev.net/community/forums/mod/journal/journal.asp?jn=316777&reply_id=2747161

Share this post


Link to post
Share on other sites
I already know the link.
Anyway, i sent an email to microsoft asking it why they eliminated the functions.
I will post the answer.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!