Added support for enabling the assignment of PixelBufferObjects to loaded Images to aid the download of images to the GPU.

Feature can be enabled/disabled (default) by setting the env :

   OSG_ASSIGN_PBO_TO_IMAGES  to ON or OFF
This commit is contained in:
Robert Osfield
2011-02-04 12:43:00 +00:00
parent d218a8c9a7
commit e0924886bd
2 changed files with 30 additions and 9 deletions

View File

@@ -216,6 +216,13 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl
DrawablePolicy getDrawablePolicy() const { return _drawablePolicy; }
/** Set whether newly loaded textures should have a PixelBufferObject assigned to them to aid download to the GPU.*/
void setApplyPBOToImages(bool assignPBOToImages) { _assignPBOToImages = assignPBOToImages; }
/** Get whether newly loaded textures should have a PixelBufferObject assigned to them..*/
bool getApplyPBOToImages() const { return _assignPBOToImages; }
/** Set whether newly loaded textures should have their UnrefImageDataAfterApply set to a specified value.*/
void setUnrefImageDataAfterApplyPolicy(bool changeAutoUnRef, bool valueAutoUnRef) { _changeAutoUnRef = changeAutoUnRef; _valueAutoUnRef = valueAutoUnRef; }
@@ -439,6 +446,7 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl
DrawablePolicy _drawablePolicy;
bool _assignPBOToImages;
bool _changeAutoUnRef;
bool _valueAutoUnRef;
bool _changeAnisotropy;