Added check against binding type of array to decide whether it's appropriate to assign array to VBO.

This commit is contained in:
Robert Osfield 2016-11-03 11:31:07 +00:00
parent fa27a1f3ed
commit 1f1c21772a

View File

@ -445,7 +445,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())
{