Page 1 of 1

Load a .x mesh file in Irrlicht.NET + other

Posted: Tue Mar 08, 2005 10:44 pm
by itguru80
Hi,
has anyone been able to do this

1) Load a .x file mesh using Irrlicht.NET API

I have tried but I get an exception every time. I tried the following line but it doesn't compile, as GetMesh returns an animated mesh.

Irrlicht.Scene.IMesh mesh = device.SceneManager.GetMesh(fileName);

2)
Does anyone know if it is possible to produce a complete .NET dll for Irrlicht by compiling the C++ source code in Visual Studio .NET - I heard a rumour that this is possible?

Thanks

;-)

Not sure but ...

Posted: Wed Mar 09, 2005 6:56 am
by Fingers

Code: Select all

	Irrlicht.Scene.IAnimatedMesh a = device.SceneManager.GetMesh( "Arrow.3ds" );
	Irrlicht.Scene.IMesh m = a.GetMesh( 0 );
If you load the Animated Mesh with the Scenemanager, then get the mesh at frame 0.

Or you could do it all in one line

Code: Select all

	Irrlicht.Scene.IMesh a = device.SceneManager.GetMesh( "Arrow.3ds" ).GetMesh( 0 );
Can't say I've tried it with a .x file, but it works with 3ds files

Tried it

Posted: Wed Mar 09, 2005 7:40 am
by Fingers
K, well I tried the code above, using the earth.x file which is in the media directory that comes with irrlicht, and it loads and gets the texture, I Then added a IMeshNode into the scene and it worked, It's not loading the texture, but the node is created and I can see the object ...

Posted: Wed Mar 09, 2005 10:44 am
by itguru80
Thanks a lot!!

Do any of you .NET users know the answer to question 2?

I was wondering whether it was possible to produce my own .NET wrapper for Irrlicht.dll somehow using Visual Studio .NET - someone said this was possible, as, as you have probably noticed the .NET wrapper for 0.8 does not have all the features.