Material Question
Posted: Sat Jun 25, 2016 3:57 pm
I've created a Plane:
Now i try to change the color of the plane:
Why will this not work?
Code: Select all
IMesh* mesh = context->getSceneMgr()->getGeometryCreator()->createPlaneMesh(
dimension2d<f32>(1.0, 1.0),
dimension2du(u32(subDivs), u32(subDivs)),
mat);
IMeshSceneNode* plane = context->getSceneMgr()->addMeshSceneNode(mesh, parent);
plane->setMaterialFlag(EMF_NORMALIZE_NORMALS, true);
plane->setMaterialType(EMT_SOLID);
Code: Select all
plane->getMaterial(0).DiffuseColor.set(255, 255, 0, 0);