diff --git a/src/osg/BufferObject.cpp b/src/osg/BufferObject.cpp index ed4a176ba..9e793ea44 100644 --- a/src/osg/BufferObject.cpp +++ b/src/osg/BufferObject.cpp @@ -208,6 +208,7 @@ void GLBufferObject::compileBuffer() if (_allocatedSize != _profile._size) { _allocatedSize = _profile._size; + OSG_INFO<<" Allocating new glBufferData(), _allocatedSize="<<_allocatedSize<glBufferData(_profile._target, _profile._size, NULL, _profile._usage); compileAll = true; } @@ -229,7 +230,6 @@ void GLBufferObject::compileBuffer() unsigned int offset = entry.offset; for(osg::Image::DataIterator img_itr(image); img_itr.valid(); ++img_itr) { - //OSG_NOTICE<<"Copying to buffer object using DataIterator, offset="<getProfile()._size() = "<<_glBufferObjects[contextID]->getProfile()._size<dirty(); + if (_glBufferObjects[i].valid()) + { + _glBufferObjects[i]->dirty(); + } } }