mirror of
https://github.com/minetest/irrlicht.git
synced 2025-06-28 06:20:21 +02:00
Refactor the way you set material properties
Instead of using SMaterial::setFlag, you now set them directly on SMaterial or SMaterialLayer.
This commit is contained in:
@ -100,10 +100,12 @@ int main(int argc, char *argv[])
|
||||
scene::IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode(mesh);
|
||||
if (node)
|
||||
{
|
||||
node->setMaterialFlag(video::EMF_LIGHTING, false);
|
||||
node->forEachMaterial([tex] (video::SMaterial &mat) {
|
||||
mat.Lighting = false;
|
||||
mat.setTexture(0, tex);
|
||||
});
|
||||
node->setFrameLoop(0, 29);
|
||||
node->setAnimationSpeed(30);
|
||||
node->setMaterialTexture(0, tex);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user