Loading meshes

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
DPrometheus
Posts: 3
Joined: Mon Apr 02, 2007 8:00 pm

Loading meshes

Post by DPrometheus »

I tried to load an .X file in Irrlicht, and I got the following error in my build output. It's not a real error but I can't see anything

NVIDIA GeForce Go 7300 nv4_disp.dll 6.14.10.8426
'IntelFPS.exe': Loaded 'C:\WINDOWS\system32\d3dx9_28.dll', No symbols loaded.
Could not open file of texture:
Loaded texture: earth.bmp
Loaded mesh: earth.x
Needed 37ms to create OctTree SceneNode.(105 nodes, 4512 polys)

I used the code in the sample on the startpage of the Irrlicht Manual:

smgr->addOctTreeSceneNode(smgr->getMesh("earth.x"));

I'm new to this so I would gladly have some help with loading meshes
Image
logosman
Posts: 9
Joined: Wed Oct 25, 2006 8:21 pm
Location: Belarus, Minsk
Contact:

Post by logosman »

I had this problem too.

Try:
smgr->addOctTreeSceneNode(smgr->getMesh("./earth.x"));

I don't know why, but it works. :)
Strange, but this error only with X format, others can "filename" without "./"
-=dura lex sed lex=-
DPrometheus
Posts: 3
Joined: Mon Apr 02, 2007 8:00 pm

Post by DPrometheus »

strange, cause he CAN find the model.. otherwise he didn't say:

Loaded texture: earth.bmp
Loaded mesh: earth.x

EDIT:
if I do a / before the mesh I get this error:
Could not load mesh, because file could not be opened.: /earth.x

and with a ./ I get this:
oaded texture: ./earth.bmp
Loaded mesh: ./earth.x
Needed 60ms to create OctTree SceneNode.(105 nodes, 4512 polys)

But I still see only my blue background..

Code: Select all


		if (device->isWindowActive())
		{
			driver->beginScene(true, true, video::SColor(0,0,0,200));

			smgr->drawAll();
And since it's a 'member' of smgr it should have be drawed..
Image
DPrometheus
Posts: 3
Joined: Mon Apr 02, 2007 8:00 pm

Post by DPrometheus »

It was just me being silly and not adding a camera sigh :roll:
Image
Post Reply