Added DatabasePager::s/getDrawablePolicy() to allow the way that the display list/VBO settings

are applied to loaded databases.
This commit is contained in:
Robert Osfield
2005-11-22 13:14:00 +00:00
parent 85b3c4b179
commit f77b38ae9c
3 changed files with 96 additions and 45 deletions

View File

@@ -166,24 +166,38 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl
* before being removed.*/
double getExpiryDelay() const { return _expiryDelay; }
/** set whether the removed subgraphs should be deleted in the database thread or not.*/
/** Set whether the removed subgraphs should be deleted in the database thread or not.*/
void setDeleteRemovedSubgraphsInDatabaseThread(bool flag) { _deleteRemovedSubgraphsInDatabaseThread = flag; }
/** get whether the removed subgraphs should be deleted in the database thread or not.*/
/** Get whether the removed subgraphs should be deleted in the database thread or not.*/
bool getDeleteRemovedSubgraphsInDatabaseThread() const { return _deleteRemovedSubgraphsInDatabaseThread; }
enum DrawablePolicy
{
DO_NOT_MODIFY_DRAWABLE_SETTINGS,
USE_DISPLAY_LISTS,
USE_VERTEX_BUFFER_OBJECTS,
USE_VERTEX_ARRAYS
};
/** set whether newly loaded textures should have their UnrefImageDataAfterApply set to a specified value.*/
/** Set how loaded drawables should be handled w.r.t their display list/vertex buffer object/vertex array settings.*/
void setDrawablePolicy(DrawablePolicy policy) { _drawablePolicy = policy; }
/** Get how loaded drawables should be handled w.r.t their display list/vertex buffer object/vertex array settings.*/
DrawablePolicy getDrawablePolicy() const { return _drawablePolicy; }
/** Set whether newly loaded textures should have their UnrefImageDataAfterApply set to a specified value.*/
void setUnrefImageDataAfterApplyPolicy(bool changeAutoUnRef, bool valueAutoUnRef) { _changeAutoUnRef = changeAutoUnRef; _valueAutoUnRef = valueAutoUnRef; }
/** get whether newly loaded textures should have their UnrefImageDataAfterApply set to a specified value.*/
/** Get whether newly loaded textures should have their UnrefImageDataAfterApply set to a specified value.*/
void getUnrefImageDataAfterApplyPolicy(bool& changeAutoUnRef, bool& valueAutoUnRef) const { changeAutoUnRef = _changeAutoUnRef; valueAutoUnRef = _valueAutoUnRef; }
/** set whether newly loaded textures should have their MaxAnisotopy set to a specified value.*/
/** Set whether newly loaded textures should have their MaxAnisotopy set to a specified value.*/
void setMaxAnisotropyPolicy(bool changeAnisotropy, float valueAnisotropy) { _changeAnisotropy = changeAnisotropy; _valueAnisotropy = valueAnisotropy; }
/** set whether newly loaded textures should have their MaxAnisotopy set to a specified value.*/
/** Set whether newly loaded textures should have their MaxAnisotopy set to a specified value.*/
void getMaxAnisotropyPolicy(bool& changeAnisotropy, float& valueAnisotropy) const { changeAnisotropy = _changeAnisotropy; valueAnisotropy = _valueAnisotropy; }
@@ -310,6 +324,8 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl
DatabaseRequestList _dataToCompileList;
mutable OpenThreads::Mutex _dataToCompileListMutex;
DrawablePolicy _drawablePolicy;
bool _changeAutoUnRef;
bool _valueAutoUnRef;
bool _changeAnisotropy;