3DS files no texture loading

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
cartoonit
Posts: 286
Joined: Mon Nov 15, 2004 6:36 pm

3DS files no texture loading

Post by cartoonit »

I've recently started using the engine but have just started loading textures and models in to my app. I'm loading an 3DS file from http://www.psionic3d.co.uk/cgi-bin/imag ... D%20Models
to be more specific the lazer out of the 4 guns section. Each time the gun is loaded and placed in the World the textures are not assigned to it and it appears black. Now I've noticed that for some reason it is only loading the texture and mesh on the second time but I am getting told that both are loaded.

I have the following code:

Code: Select all

 scene::IAnimatedMeshSceneNode *Gun = Smgr->addAnimatedMeshSceneNode(Smgr->getMesh(".\\meshes\\lazer.3ds"));
			  
Gun->setPosition(core::vector3df(-70,0,-90));
Gun->setScale(core::vector3df(2.0f,2.0f,2.0f));
Any ideas? I have looked all over the message boards but all that seems to be the response is that they should load automatically if in the same directory as the 3ds files???
jikbar
Posts: 62
Joined: Wed Aug 25, 2004 4:48 pm
Location: Canada
Contact:

Post by jikbar »

Code: Select all

Gun->setMaterialFlag(EMF_LIGHTING, false);
This code will enable your gun to light itself (using the emmisive color). A value of true in the second parameter will disable self-illumination so that your node will be affected by dynamic lights.
Post Reply