From 52d5d80508451d91d704d8ee9d83ee4c55bc8986 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 19 Jul 2013 20:59:14 +0000 Subject: [PATCH] Added default setting of BIND_PER_VERTEX when applying Geometry::setTexCoordArray() --- src/osg/Geometry.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/osg/Geometry.cpp b/src/osg/Geometry.cpp index d758e939f..ca0f4add5 100644 --- a/src/osg/Geometry.cpp +++ b/src/osg/Geometry.cpp @@ -161,12 +161,14 @@ void Geometry::setTexCoordArray(unsigned int index,Array* array, osg::Array::Bin if (_texCoordList.size()<=index) _texCoordList.resize(index+1); - if (array && binding!=osg::Array::BIND_UNDEFINED) array->setBinding(binding); + if (array) + { + if (binding!=osg::Array::BIND_UNDEFINED) array->setBinding(binding); + else array->setBinding(osg::Array::BIND_PER_VERTEX); + } _texCoordList[index] = array; - // do we set to array BIND_PER_VERTEX? - dirtyDisplayList(); if (_useVertexBufferObjects && array)