Commented out the smoothing of FLAT_TRIANGLE_STRIP and FLAT_TRIANGLE_FAN

since it was causes problems with any color list which were attached.
This commit is contained in:
Robert Osfield 2002-01-02 10:59:59 +00:00
parent e767db9182
commit 0d4448787b

View File

@ -82,6 +82,7 @@ void SmoothingVisitor::smooth(osg::GeoSet& gset)
case(GeoSet::TRIANGLE_FAN):
doSmoothing = true;
break;
/*
case(GeoSet::FLAT_TRIANGLE_STRIP):
primTypeOut = GeoSet::TRIANGLE_STRIP;
doSmoothing = true;
@ -90,6 +91,7 @@ void SmoothingVisitor::smooth(osg::GeoSet& gset)
primTypeOut = GeoSet::TRIANGLE_FAN;
doSmoothing = true;
break;
*/
case(GeoSet::QUADS):
case(GeoSet::QUAD_STRIP):
case(GeoSet::POLYGON):
@ -138,7 +140,23 @@ void SmoothingVisitor::smooth(osg::GeoSet& gset)
}
if (primTypeIn!=primTypeOut)
{
if (primTypeIn==GeoSet::FLAT_TRIANGLE_STRIP)
{
gset.setColorBinding( osg::GeoSet::BIND_OFF );
gset.setColors(NULL);
}
else
if (primTypeIn==GeoSet::FLAT_TRIANGLE_STRIP)
{
gset.setColorBinding( osg::GeoSet::BIND_OFF );
gset.setColors(NULL);
}
gset.setPrimType( primTypeOut );
}
gset.dirtyDisplayList();