From 92f68e26697160343d4eac01bae6f9087f442b5c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 5 Feb 2002 10:49:58 +0000 Subject: [PATCH] Added comment to flt2osg's handling of osg::Material setup w.r.t osg::Material::_colorMode. --- src/osgPlugins/flt/flt2osg.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/osgPlugins/flt/flt2osg.cpp b/src/osgPlugins/flt/flt2osg.cpp index 8dbba598f..f6e681729 100644 --- a/src/osgPlugins/flt/flt2osg.cpp +++ b/src/osgPlugins/flt/flt2osg.cpp @@ -888,6 +888,13 @@ void ConvertFromFLT::visitFace(GeoSetBuilder* pBuilder, FaceRecord* rec) osgMaterial->setAlpha(osg::Material::FRONT_AND_BACK, alpha); 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) { osgStateSet->setMode(GL_BLEND, osg::StateAttribute::ON);