Different textures on different faces of the cube
Posted: Wed Feb 23, 2022 3:47 pm
Hello everyone, I need a hint.
If I create a cube in the scene:
then in this cube the texture "wood-texture.jpg" is set on all 6 faces.
How can I set different textures to different faces of this cube?
Thanks.
If I create a cube in the scene:
Code: Select all
scene::ISceneNode* sn=smgr->addCubeSceneNode(1.f);
sn->setPosition(core::vector3df(0,0,0));
sn->setScale(core::vector3df(10.f,15.f,20.f));
sn->setMaterialTexture(0,driver->getTexture("wood-texture.jpg"));
sn->setMaterialFlag(video::EMF_LIGHTING,false);
How can I set different textures to different faces of this cube?
Thanks.