diff --git a/components/sceneutil/riggeometry.cpp b/components/sceneutil/riggeometry.cpp index 5a12b5b4f..410ab5300 100644 --- a/components/sceneutil/riggeometry.cpp +++ b/components/sceneutil/riggeometry.cpp @@ -94,33 +94,16 @@ void RigGeometry::setSourceGeometry(osg::ref_ptr sourceGeometry) if (from.getStateSet()) setStateSet(from.getStateSet()); - // copy over primitive sets. + // shallow copy primitive sets & vertex attributes that we will not modify getPrimitiveSetList() = from.getPrimitiveSetList(); - - if (from.getColorArray()) - setColorArray(from.getColorArray()); - - if (from.getSecondaryColorArray()) - setSecondaryColorArray(from.getSecondaryColorArray()); - - if (from.getFogCoordArray()) - setFogCoordArray(from.getFogCoordArray()); - - for(unsigned int ti=0;ti vbo (new osg::VertexBufferObject); vbo->setUsage(GL_DYNAMIC_DRAW_ARB); diff --git a/components/sceneutil/riggeometry.hpp b/components/sceneutil/riggeometry.hpp index 03c287b81..301d206fa 100644 --- a/components/sceneutil/riggeometry.hpp +++ b/components/sceneutil/riggeometry.hpp @@ -36,6 +36,8 @@ namespace SceneUtil void setInfluenceMap(osg::ref_ptr influenceMap); + /// Initialize this geometry from the source geometry. + /// @note The source geometry will not be modified. void setSourceGeometry(osg::ref_ptr sourceGeom); // Called automatically by our CullCallback