diff --git a/src/osg/Geometry.cpp b/src/osg/Geometry.cpp index 3842a7c1b..f16f20343 100644 --- a/src/osg/Geometry.cpp +++ b/src/osg/Geometry.cpp @@ -1764,7 +1764,7 @@ void Geometry::accept(PrimitiveIndexFunctor& functor) const return; } - if (!_vertexData.indices.valid()) + if (!indices) { for(PrimitiveSetList::const_iterator itr=_primitives.begin(); itr!=_primitives.end(); @@ -1793,7 +1793,7 @@ void Geometry::accept(PrimitiveIndexFunctor& functor) const vindexindex(vindex)); + functor.vertex(indices->index(vindex)); } functor.end(); @@ -1813,7 +1813,7 @@ void Geometry::accept(PrimitiveIndexFunctor& functor) const for(GLsizei primCount=0;primCount<*primItr;++primCount) { - functor.vertex(_vertexData.indices->index(vindex)); + functor.vertex(indices->index(vindex)); ++vindex; } @@ -1833,7 +1833,7 @@ void Geometry::accept(PrimitiveIndexFunctor& functor) const ++primCount,++primItr) { unsigned int vindex=*primItr; - functor.vertex(_vertexData.indices->index(vindex)); + functor.vertex(indices->index(vindex)); } functor.end(); @@ -1849,7 +1849,7 @@ void Geometry::accept(PrimitiveIndexFunctor& functor) const ++primItr) { unsigned int vindex=*primItr; - functor.vertex(_vertexData.indices->index(vindex)); + functor.vertex(indices->index(vindex)); } functor.end(); @@ -1865,7 +1865,7 @@ void Geometry::accept(PrimitiveIndexFunctor& functor) const ++primItr) { unsigned int vindex=*primItr; - functor.vertex(_vertexData.indices->index(vindex)); + functor.vertex(indices->index(vindex)); } functor.end();