From Geoff Michel :

ac3d loader - better sharing of states between objects and Roger James' bug fix for missing normals.

  Tesselator.cpp - faster processing of polygon tesselation for single triangles (which dont need to be tesselated)

  osgtesselate.cpp - added wrap for texture so that appearance is as originally. Default texture behaviour has changed to clamp."
This commit is contained in:
Robert Osfield
2005-04-30 13:54:21 +00:00
parent 67baa30218
commit 81f60233a9
3 changed files with 128 additions and 37 deletions

View File

@@ -209,7 +209,7 @@ void Tesselator::retesselatePolygons(osg::Geometry &geom)
{
osg::ref_ptr<osg::PrimitiveSet> primitive = _Contours[primNo].get();
if (_ttype==TESS_TYPE_POLYGONS || _ttype==TESS_TYPE_DRAWABLE)
{
{ // this recovers the 'old' tesselation which just retesselates single polygons.
if (primitive->getMode()==osg::PrimitiveSet::POLYGON || _ttype==TESS_TYPE_DRAWABLE)
{
@@ -231,10 +231,14 @@ void Tesselator::retesselatePolygons(osg::Geometry &geom)
}
else
{
beginTesselation();
if (primitive->getNumIndices()>3) { // April 2005 gwm only retesselate "complex" polygons
beginTesselation();
addContour(primitive.get(), vertices);
endTesselation();
collectTesselation(geom);
endTesselation();
collectTesselation(geom);
} else { // April 2005 gwm triangles don't need to be retesselated
geom.addPrimitiveSet(primitive.get());
}
}
}