Loading *.X file format

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
TimVasko
Posts: 9
Joined: Thu Jun 26, 2008 7:25 pm
Location: Maryland, US

Loading *.X file format

Post by TimVasko »

Hi, I just started using Irrlicht, and I wrote my own engines before but the design turned out to be the most complicated stage and its very difficult to get the proper interface.

Now, I am very pleased with Irrlicht, and I have version 1.4.1, does irrlicht allow you to load .X file format (directX models) without using the DirectX API, I prefer OpenGL?

Thank you in advance.
---------
I'm on your side.
---------
Dark_Kilauea
Posts: 368
Joined: Tue Aug 21, 2007 1:43 am
Location: The Middle of Nowhere

Post by Dark_Kilauea »

Yes, irrlicht can load .x files like any other. For a full list of loadable file types, see the feature list on the website.
rogerborg wrote:Every time someone learns to use a debugger, an angel gets their wings.
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Yes, it does. The file format loaders are independent of the platform or rendering device.

By default, a Windows Irrlicht build will assume that a DXSDK is present and will try to build a DX9 device. If you don't want that, then in include/IrrCompileConfig.h you can just comment out ...

Code: Select all

#define _IRR_COMPILE_WITH_DIRECT3D_9_
...then it won't try to compile any DX device. I get by just fine with openGL on Windows.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Re: Loading *.X file format

Post by Acki »

TimVasko wrote:does irrlicht allow you to load .X file format (directX models) without using the DirectX API, I prefer OpenGL?
I never understood why people just trying out stuff like this ??? :shock:
It's the simplest to just take the hello world example, change the driver to OGL and try to load a DX file instead of the sidney one, isn't it... :lol:
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

You ungrateful son of a bitch, he thanked you in advance. A million years' bad karma on you!
Last edited by rogerborg on Thu Jun 26, 2008 9:53 pm, edited 1 time in total.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

"does irrlicht allow you to load .X file format (directX models) without using the DirectX API, I prefer OpenGL? "

Yes, there is code written entirely in C++, see CXMeshFileLoader.h for details.

That code will read your .X file no matter what device you select.

The DX API has .x file loaders or mesh loaders, but they are not called or used in Irrlicht.
Image
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

rogerborg wrote:You ungrateful son of a bitch, he thanked you in advance. A million years' bad karma on you!
ROFL, I think I got cursed so many times here, so meanwhile I must be a Zombie !!! :P
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
TimVasko
Posts: 9
Joined: Thu Jun 26, 2008 7:25 pm
Location: Maryland, US

Post by TimVasko »

Thank you very much, that answered my questions. I was trying to apply an outdated patch and it included IAnimatedMeshWhateverX file, similar to MD2, 3DS etc. And I missed the fact that the 3d party patch was old.

You guys were very helpful, and rogerborg - I've done that, it doesn't compile w/o the DX SDK :(

I will stick around.
---------
I'm on your side.
---------
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

TimVasko wrote:rogerborg - I've done that, it doesn't compile w/o the DX SDK :(
That's strange. I don't have a DXSDK, and I can build the SVN trunk fine with _IRR_COMPILE_WITH_DIRECT3D_9_ commented out.

Can I ask you to share:

1. The version of Irrlicht that you're building.
2. The exact error message.
3. The compiler that you're using.

I'm wondering if it's a missing Platform SDK / VC++ Express 2005 issue, rather than a DXSDK issue.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
TimVasko
Posts: 9
Joined: Thu Jun 26, 2008 7:25 pm
Location: Maryland, US

Post by TimVasko »

no no no, im sorry I was somewhat ambiguous in my message. It compiles fine with the directive from your message (uh _IRR_COMPILE_WITH_DIRECT3D_9_) commented out. I meant I couldn't compile it with the compiler directive set.

So essentially what I was saying: I had to do what you mentioned earlier, because otherwise it didn't compile.

Forgive my rambling, its the medication. And thanks for your concern.
---------
I'm on your side.
---------
Post Reply