From Anish Thomas, "Underflow bug in BufferObject pool usage"

This commit is contained in:
Robert Osfield
2016-02-22 09:19:51 +00:00
parent 78aaf7955e
commit e8ac5af41b

View File

@@ -194,11 +194,13 @@ void GLBufferObject::compileBuffer()
{
OSG_INFO<<"newTotalSize="<<newTotalSize<<", _profile._size="<<_profile._size<<std::endl;
unsigned int sizeDifference = newTotalSize - _profile._size;
_profile._size = newTotalSize;
if (_set)
{
_set->moveToSet(this, _set->getParent()->getGLBufferObjectSet(_profile));
_set->getParent()->getCurrGLBufferObjectPoolSize() += sizeDifference;
}
}