Added material setName.

This commit is contained in:
Robert Osfield 2010-08-16 14:24:12 +00:00
parent 024fc1dca3
commit a1ad09bba9

View File

@ -326,7 +326,7 @@ void ReaderWriterOBJ::buildMaterialToStateSetMap(obj::Model& model, MaterialToSt
{
osg::Material* osg_material = new osg::Material;
stateset->setAttribute(osg_material);
osg_material->setName(material.name);
osg_material->setAmbient(osg::Material::FRONT_AND_BACK,material.ambient);
osg_material->setDiffuse(osg::Material::FRONT_AND_BACK,material.diffuse);
osg_material->setEmission(osg::Material::FRONT_AND_BACK,material.emissive);