Added comment to flt2osg's handling of osg::Material setup w.r.t

osg::Material::_colorMode.
This commit is contained in:
Robert Osfield 2002-02-05 10:49:58 +00:00
parent 18998a0654
commit 92f68e2669

View File

@ -888,6 +888,13 @@ void ConvertFromFLT::visitFace(GeoSetBuilder* pBuilder, FaceRecord* rec)
osgMaterial->setAlpha(osg::Material::FRONT_AND_BACK, alpha); osgMaterial->setAlpha(osg::Material::FRONT_AND_BACK, alpha);
osgMaterial->setShininess(osg::Material::FRONT_AND_BACK, pSMaterial->sfShininess/128.0f); osgMaterial->setShininess(osg::Material::FRONT_AND_BACK, pSMaterial->sfShininess/128.0f);
// Brede,
// is there anything in the fly material which might control color mode??
// some models work better without color mode defined, other work better without it, the
// effect is particularily noticable with models with alpha blending on color coords but not
// on material. Robert Osfield, Feb 02.
//osgMaterial->setColorMode(osg::Material::AMBIENT_AND_DIFFUSE);
if (alpha < 1.0f) if (alpha < 1.0f)
{ {
osgStateSet->setMode(GL_BLEND, osg::StateAttribute::ON); osgStateSet->setMode(GL_BLEND, osg::StateAttribute::ON);