Added check against Array::Binding to decide whether to assign a VertexBufferObject to an array or not, only assigning it when Binding is BIND_PER_VERTEX

This commit is contained in:
Robert Osfield
2016-09-01 14:34:00 +01:00
parent 886b922596
commit ff779e58ab

View File

@@ -451,7 +451,7 @@ bool Geometry::getDrawElementsList(DrawElementsList& drawElementsList) const
void Geometry::addVertexBufferObjectIfRequired(osg::Array* array)
{
/*if (_useVertexBufferObjects)*/
if (/*_useVertexBufferObjects &&*/ array->getBinding()==Array::BIND_PER_VERTEX)
{
if (!array->getVertexBufferObject())
{