From Lionel Lagarde, "Support for paging and shared PBO"

"The attached file contains:
- a per-context read counter in GLBufferObject::BufferEntry
- a global client counter in BufferData
- the glue between Texture* and Image client counter
"
This commit is contained in:
Robert Osfield
2013-06-27 16:44:32 +00:00
parent 57947ea75c
commit 9f13e2fcb9
10 changed files with 180 additions and 58 deletions

View File

@@ -2089,8 +2089,12 @@ void Texture::applyTexImage2D_load(State& state, GLenum target, const Image* ima
const BufferObject* bo = image->getBufferObject();
if (bo->getCopyDataAndReleaseGLBufferObject())
{
//OSG_NOTICE<<"Release PBO"<<std::endl;
bo->releaseGLObjects(&state);
pbo->setBufferDataHasBeenRead(image);
if (pbo->hasAllBufferDataBeenRead())
{
//OSG_NOTICE<<"Release PBO"<<std::endl;
bo->releaseGLObjects(&state);
}
}
}