Implementated experimental reuse of PBO's after download
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -39,6 +39,7 @@ class OSGUTIL_EXPORT StateToCompile : public osg::NodeVisitor
|
||||
TextureSet _textures;
|
||||
ProgramSet _programs;
|
||||
bool _assignPBOToImages;
|
||||
osg::ref_ptr<osg::PixelBufferObject> _pbo;
|
||||
|
||||
bool empty() const { return _textures.empty() && _programs.empty() && _drawables.empty(); }
|
||||
|
||||
@@ -48,6 +49,7 @@ class OSGUTIL_EXPORT StateToCompile : public osg::NodeVisitor
|
||||
virtual void apply(osg::Drawable& drawable);
|
||||
virtual void apply(osg::StateSet& stateset);
|
||||
virtual void apply(osg::Texture& texture);
|
||||
|
||||
};
|
||||
|
||||
class OSGUTIL_EXPORT IncrementalCompileOperation : public osg::GraphicsOperation
|
||||
|
||||
Reference in New Issue
Block a user