Skip to content

Commit

Permalink
Fixed handling of changes in gl buffer object size so that when a gl …
Browse files Browse the repository at this point in the history
…buffer object is resized all the buffer data

is recompiled.
  • Loading branch information
robertosfield committed May 26, 2011
1 parent d137c26 commit 52146aa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/osg/BufferObject.cpp
Expand Up @@ -187,6 +187,7 @@ void GLBufferObject::compileBuffer()
{
_allocatedSize = _profile._size;
_extensions->glBufferData(_profile._target, _profile._size, NULL, _profile._usage);
compileAll = true;
}

for(BufferEntries::iterator itr = _bufferEntries.begin();
Expand Down Expand Up @@ -1299,7 +1300,9 @@ unsigned int BufferObject::addBufferData(BufferData* bd)

_bufferDataList.push_back(bd);

//OSG_NOTICE<<"BufferObject "<<this<<":"<<className()<<"::addBufferData("<<bd<<"), bufferIndex= "<<_bufferDataList.size()-1<<std::endl;
dirty();

//OSG_NOTICE<<"BufferObject "<<this<<":"<<className()<<"::addBufferData("<<bd<<"), bufferIndex= "<<_bufferDataList.size()-1<<std::endl;

return _bufferDataList.size()-1;
}
Expand Down

0 comments on commit 52146aa

Please sign in to comment.