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:
parent
e767db9182
commit
0d4448787b
@ -82,6 +82,7 @@ void SmoothingVisitor::smooth(osg::GeoSet& gset)
|
|||||||
case(GeoSet::TRIANGLE_FAN):
|
case(GeoSet::TRIANGLE_FAN):
|
||||||
doSmoothing = true;
|
doSmoothing = true;
|
||||||
break;
|
break;
|
||||||
|
/*
|
||||||
case(GeoSet::FLAT_TRIANGLE_STRIP):
|
case(GeoSet::FLAT_TRIANGLE_STRIP):
|
||||||
primTypeOut = GeoSet::TRIANGLE_STRIP;
|
primTypeOut = GeoSet::TRIANGLE_STRIP;
|
||||||
doSmoothing = true;
|
doSmoothing = true;
|
||||||
@ -90,6 +91,7 @@ void SmoothingVisitor::smooth(osg::GeoSet& gset)
|
|||||||
primTypeOut = GeoSet::TRIANGLE_FAN;
|
primTypeOut = GeoSet::TRIANGLE_FAN;
|
||||||
doSmoothing = true;
|
doSmoothing = true;
|
||||||
break;
|
break;
|
||||||
|
*/
|
||||||
case(GeoSet::QUADS):
|
case(GeoSet::QUADS):
|
||||||
case(GeoSet::QUAD_STRIP):
|
case(GeoSet::QUAD_STRIP):
|
||||||
case(GeoSet::POLYGON):
|
case(GeoSet::POLYGON):
|
||||||
@ -138,7 +140,23 @@ void SmoothingVisitor::smooth(osg::GeoSet& gset)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (primTypeIn!=primTypeOut)
|
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.setPrimType( primTypeOut );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
gset.dirtyDisplayList();
|
gset.dirtyDisplayList();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user