Modified Files:

mat.cxx: Fix dark scenery problem.
This commit is contained in:
frohlich 2006-11-07 06:40:35 +00:00
parent 322789cd4c
commit 11ecbb6ca7

View File

@ -287,14 +287,14 @@ SGMaterial::build_state( bool defer_tex_load )
} }
osg::Material* material = new osg::Material; osg::Material* material = new osg::Material;
material->setColorMode(osg::Material::DIFFUSE); material->setColorMode(osg::Material::AMBIENT_AND_DIFFUSE);
material->setAmbient(osg::Material::FRONT_AND_BACK, ambient.osg()); material->setAmbient(osg::Material::FRONT_AND_BACK, ambient.osg());
material->setDiffuse(osg::Material::FRONT_AND_BACK, diffuse.osg()); material->setDiffuse(osg::Material::FRONT_AND_BACK, diffuse.osg());
material->setSpecular(osg::Material::FRONT_AND_BACK, specular.osg()); material->setSpecular(osg::Material::FRONT_AND_BACK, specular.osg());
material->setEmission(osg::Material::FRONT_AND_BACK, emission.osg()); material->setEmission(osg::Material::FRONT_AND_BACK, emission.osg());
material->setShininess(osg::Material::FRONT_AND_BACK, shininess ); material->setShininess(osg::Material::FRONT_AND_BACK, shininess );
stateSet->setAttribute(material); stateSet->setAttribute(material);
// stateSet->setMode(GL_COLOR_MATERIAL, osg::StateAttribute::ON); stateSet->setMode(GL_COLOR_MATERIAL, osg::StateAttribute::ON);
_status[i].state = stateSet; _status[i].state = stateSet;
} }