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 4371512dd2
commit 40caedc7cd

View File

@@ -188,11 +188,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;
}
}