Here's my problem: I created a custom node (with the code of the third tutorial), my custom node is beam wood (at least the shape).
I tried to put a texture on it but it's scaling it not repeating it, so instead of having my beam that looks like wood : I get a brown beam (all brown).
So far I found out that:
I can't set a repeated texture to an ISceneNode, I have to create an IMeshNode to set my texture to every meshBuffer.
Does it mean I have change all my code ? I spent so much time on it...
I also found this:
Code: Select all
scene::IAnimatedMesh *room = scenegraph->getMesh("room.3ds");
scene::IMeshSceneNode *Nroom = scenegraph->addMeshSceneNode(room->getMesh(0));
Nroom->setMaterialFlag(video::EMF_LIGHTING, true);
scenegraph->getMeshManipulator()->makePlanarTextureMapping(room->getMesh(0), 0.04f);
Nroom->setMaterialTexture( 0, driver->getTexture("rockwall.bmp") );
Thank you,
Billy.