Implementated new dirty buffer mechansim for BufferObjects to make it more efficient

This commit is contained in:
Robert Osfield
2007-04-30 12:18:27 +00:00
parent efb52dfab9
commit d625a5e114
11 changed files with 104 additions and 37 deletions

View File

@@ -285,7 +285,7 @@ void TextureRectangle::applyTexImage_load(GLenum target, Image* image, State& st
const PixelBufferObject* pbo = image->getPixelBufferObject();
if (pbo && pbo->isPBOSupported(contextID))
{
pbo->compileBuffer(state);
pbo->compileBuffer(contextID, state);
pbo->bindBuffer(contextID);
dataMinusOffset = image->data();
dataPlusOffset = reinterpret_cast<unsigned char*>(pbo->offset());
@@ -352,7 +352,7 @@ void TextureRectangle::applyTexImage_subload(GLenum target, Image* image, State&
const PixelBufferObject* pbo = image->getPixelBufferObject();
if (pbo && pbo->isPBOSupported(contextID))
{
pbo->compileBuffer(state);
pbo->compileBuffer(contextID, state);
pbo->bindBuffer(contextID);
dataMinusOffset = image->data();
dataPlusOffset = reinterpret_cast<unsigned char*>(pbo->offset()); // -dataMinusOffset+dataPlusOffset