I have a problem applying a simple texture to a custom scene node with irrlicht 1.4. I do not have this problem with Irrlicht 1.3.1. I use the OpenGL renderer under Linux.
How to get the problem:
* Add the "setMaterialTexture" line to the 03.CustomSceneNode irrlicht 1.4 tutorial:
Code: Select all
// createRotationAnimator() could return 0, so should be checked
if(anim)
{
myNode->addAnimator(anim);
// I'm done referring to anim, so must drop this reference now because it
// was produced by a createFoo() function.
anim->drop();
anim = 0; // As I shouldn't refer to it again, ensure that I can't
}
// This is the line to add (set diffuse texture)
myNode->setMaterialTexture(0, driver->getTexture("../../media/012shot.jpg"));
// I'm done with my CSampleSceneNode object, and so must drop my reference
myNode->drop();
myNode = 0; // As I shouldn't refer to it again, ensure that I can't
* Adding a myNode->setMaterialType(video::EMT_SOLID); line does not help.
* If I build/link the same code against irrLicht 1.3.1 the tetraeder is totally textured
So I suspect that I have to do something different in irrLicht 1.4 to get the same effect.
Can someone help me ?
Thanks in advance.