From 4665a2f03368be95f4773463f733dbdd88f63c5f Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 14 Jun 2018 08:51:00 +0100 Subject: [PATCH] To handle calling Array::setBinding() after Geometry::set*Array() call, to the Geometry::addVertexBufferObjectIfRequired(osg::Array* array) added treatment of array->getBinding()==Array::BIND_UNDEFINED as BIND_PER_VERTEX as a safe fallback. --- src/osg/Geometry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osg/Geometry.cpp b/src/osg/Geometry.cpp index 97dd00eb2..162f8a545 100644 --- a/src/osg/Geometry.cpp +++ b/src/osg/Geometry.cpp @@ -535,7 +535,7 @@ bool Geometry::getDrawElementsList(DrawElementsList& drawElementsList) const void Geometry::addVertexBufferObjectIfRequired(osg::Array* array) { - if (/*_useVertexBufferObjects &&*/ array->getBinding()==Array::BIND_PER_VERTEX) + if (/*_useVertexBufferObjects &&*/ array->getBinding()==Array::BIND_PER_VERTEX || array->getBinding()==Array::BIND_UNDEFINED) { if (!array->getVertexBufferObject()) {