Implementated experimental reuse of PBO's after download

This commit is contained in:
Robert Osfield
2011-02-07 14:19:58 +00:00
parent e0924886bd
commit 4b4754c3cf
5 changed files with 49 additions and 7 deletions

View File

@@ -528,6 +528,14 @@ class OSG_EXPORT BufferObject : public Object
BufferObjectProfile& getProfile() { return _profile; }
const BufferObjectProfile& getProfile() const { return _profile; }
/** Set whether the BufferObject should use a GLBufferObject just for copying the BufferData and release it immmediately so that it may be reused.*/
void setCopyDataAndReleaseGLBufferObject(bool copyAndRelease) { _copyDataAndReleaseGLBufferObject = copyAndRelease; }
/** Get whether the BufferObject should use a GLBufferObject just for copying the BufferData and release it immmediately.*/
bool getCopyDataAndReleaseGLBufferObject() const { return _copyDataAndReleaseGLBufferObject; }
void dirty();
/** Resize any per context GLObject buffers to specified size. */
@@ -572,6 +580,8 @@ class OSG_EXPORT BufferObject : public Object
BufferObjectProfile _profile;
bool _copyDataAndReleaseGLBufferObject;
BufferDataList _bufferDataList;
mutable GLBufferObjects _glBufferObjects;