From 58582998faee225d5b86d9fbbc5ca3cd7c858870 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 12 Oct 2001 20:06:35 +0000 Subject: [PATCH] Added support for the new AttributeUpdateFunctors. --- src/osg/GeoSet.cpp | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/src/osg/GeoSet.cpp b/src/osg/GeoSet.cpp index 669e9ade6..846269977 100644 --- a/src/osg/GeoSet.cpp +++ b/src/osg/GeoSet.cpp @@ -645,3 +645,41 @@ void GeoSet::setInterleavedArray( const InterleaveArrayType format, float *ia, I set_fast_path(); } +Drawable::AttributeBitMask GeoSet::suppportsAttributeUpdate() const +{ + // we do support coords,normals,texcoords and colors so return true. + return COORDS | NORMALS | COLORS | TEXTURE_COORDS; +} + +Drawable::AttributeBitMask GeoSet::applyAttributeUpdate(AttributeBitMask amb,AttributeUpdateFunctor& auf) +{ + computeNumVerts(); + + AttributeBitMask ramb = 0; + + if ((amb & COORDS) && _coords && _numcoords) + { +// cout << "number of coords = "<<_numcoords<