Introduced new GLBufferObject pool for managing the memory footprint taken up by VertexBufferObejct, ElementBufferObject and PixelBufferObject.

This commit is contained in:
Robert Osfield 2009-10-03 09:25:23 +00:00
parent f75013d534
commit 32b21dbb89
16 changed files with 1455 additions and 532 deletions

View File

@ -17,6 +17,10 @@
#include <osg/GL>
#include <osg/Object>
#include <osg/buffered_value>
#include <osg/FrameStamp>
#include <list>
#include <map>
#ifndef GL_ARB_vertex_buffer_object
@ -102,12 +106,73 @@ class State;
class BufferData;
class BufferObject;
class BufferObjectProfile
{
public:
BufferObjectProfile():
_target(0),
_usage(0),
_size(0) {}
BufferObjectProfile(GLenum target, GLenum usage, unsigned int size):
_target(target),
_usage(usage),
_size(size) {}
BufferObjectProfile(const BufferObjectProfile& bpo):
_target(bpo._target),
_usage(bpo._usage),
_size(bpo._size) {}
bool operator < (const BufferObjectProfile& rhs) const
{
if (_target < rhs._target) return true;
else if (_target > rhs._target) return false;
if (_usage < rhs._usage) return true;
else if (_usage > rhs._usage) return false;
return _size < rhs._size;
}
bool operator == (const BufferObjectProfile& rhs) const
{
return (_target == rhs._target) &&
(_usage == rhs._usage) &&
(_size == rhs._size);
}
void setProfile(GLenum target, GLenum usage, unsigned int size)
{
_target = target;
_usage = usage;
_size = size;
}
BufferObjectProfile& operator = (const BufferObjectProfile& rhs)
{
_target = rhs._target;
_usage = rhs._usage;
_size = rhs._size;
return *this;
}
GLenum _target;
GLenum _usage;
GLenum _size;
};
// forward declare
class GLBufferObjectSet;
class GLBufferObjectManager;
class OSG_EXPORT GLBufferObject : public Referenced
{
public:
GLBufferObject(unsigned int contextID, BufferObject* bufferObject=0);
void setProfile(const BufferObjectProfile& profile) { _profile = profile; }
const BufferObjectProfile& getProfile() const { return _profile; }
void setBufferObject(BufferObject* bufferObject);
BufferObject* getBufferObject() { return _bufferObject; }
@ -143,14 +208,11 @@ class OSG_EXPORT GLBufferObject : public Referenced
inline GLuint getGLObjectID() const { return _glObjectID; }
inline GLsizeiptrARB getOffset(unsigned int i) const { return _bufferEntries[i].offset; }
inline void bindBuffer() const
{
_extensions->glBindBuffer(_target,_glObjectID);
}
void bindBuffer();
inline void unbindBuffer() const
inline void unbindBuffer()
{
_extensions->glBindBuffer(_target,0);
_extensions->glBindBuffer(_profile._target,0);
}
inline bool isDirty() const { return _dirty; }
@ -176,15 +238,10 @@ class OSG_EXPORT GLBufferObject : public Referenced
* by contextID.*/
static void deleteBufferObject(unsigned int contextID,GLuint globj);
/** flush all the cached display list which need to be deleted
* in the OpenGL context related to contextID.*/
static void flushDeletedBufferObjects(unsigned int contextID,double /*currentTime*/, double& availableTime);
/** dicard all the cached display list which need to be deleted
* in the OpenGL context related to contextID.
* Note, unlike flush no OpenGL calls are made, instead the handles are all removed.
* this call is useful for when an OpenGL context has been destroyed. */
static void discardDeletedBufferObjects(unsigned int contextID);
static void flushAllDeletedBufferObjects(unsigned int contextID);
static void discardAllDeletedBufferObjects(unsigned int contextID);
static void flushDeletedBufferObjects(unsigned int contextID,double currentTime, double& availbleTime);
static void releaseGLBufferObject(unsigned int contextID, GLBufferObject* to);
/** Extensions class which encapsulates the querying of extensions and
* associated function pointers, and provide convenience wrappers to
@ -264,23 +321,153 @@ class OSG_EXPORT GLBufferObject : public Referenced
unsigned int _contextID;
GLuint _glObjectID;
GLenum _target;
GLenum _usage;
BufferObjectProfile _profile;
unsigned int _allocatedSize;
bool _dirty;
mutable unsigned int _totalSize;
typedef std::vector<BufferEntry> BufferEntries;
BufferEntries _bufferEntries;
BufferObject* _bufferObject;
public:
GLBufferObjectSet* _set;
GLBufferObject* _previous;
GLBufferObject* _next;
unsigned int _frameLastUsed;
public:
Extensions* _extensions;
};
typedef std::list< ref_ptr<GLBufferObject> > GLBufferObjectList;
class OSG_EXPORT GLBufferObjectSet : public Referenced
{
public:
GLBufferObjectSet(GLBufferObjectManager* parent, const BufferObjectProfile& profile);
void handlePendingOrphandedGLBufferObjects();
void flushAllDeletedGLBufferObjects();
void discardAllDeletedGLBufferObjects();
void flushDeletedGLBufferObjects(double currentTime, double& availableTime);
GLBufferObject* takeFromOrphans(BufferObject* bufferObject);
GLBufferObject* takeOrGenerate(BufferObject* bufferObject);
void moveToBack(GLBufferObject* to);
void addToBack(GLBufferObject* to);
void orphan(GLBufferObject* to);
void remove(GLBufferObject* to);
unsigned int size() const { return _profile._size * _numOfGLBufferObjects; }
bool makeSpace(unsigned int& size);
bool checkConsistency() const;
GLBufferObjectManager* getParent() { return _parent; }
protected:
virtual ~GLBufferObjectSet();
OpenThreads::Mutex _mutex;
GLBufferObjectManager* _parent;
unsigned int _contextID;
BufferObjectProfile _profile;
unsigned int _numOfGLBufferObjects;
GLBufferObjectList _orphanedGLBufferObjects;
GLBufferObjectList _pendingOrphanedGLBufferObjects;
GLBufferObject* _head;
GLBufferObject* _tail;
};
class OSG_EXPORT GLBufferObjectManager : public osg::Referenced
{
public:
GLBufferObjectManager(unsigned int contextID);
unsigned int getContextID() const { return _contextID; }
void setNumberActiveGLBufferObjects(unsigned int size) { _numActiveGLBufferObjects = size; }
unsigned int& getNumberActiveGLBufferObjects() { return _numActiveGLBufferObjects; }
unsigned int getNumberActiveGLBufferObjects() const { return _numActiveGLBufferObjects; }
void setNumberOrphanedGLBufferObjects(unsigned int size) { _numOrphanedGLBufferObjects = size; }
unsigned int& getNumberOrphanedGLBufferObjects() { return _numOrphanedGLBufferObjects; }
unsigned int getNumberOrphanedGLBufferObjects() const { return _numOrphanedGLBufferObjects; }
void setCurrGLBufferObjectPoolSize(unsigned int size) { _currGLBufferObjectPoolSize = size; }
unsigned int& getCurrGLBufferObjectPoolSize() { return _currGLBufferObjectPoolSize; }
unsigned int getCurrGLBufferObjectPoolSize() const { return _currGLBufferObjectPoolSize; }
void setMaxGLBufferObjectPoolSize(unsigned int size);
unsigned int getMaxGLBufferObjectPoolSize() const { return _maxGLBufferObjectPoolSize; }
bool hasSpace(unsigned int size) const { return (_currGLBufferObjectPoolSize+size)<=_maxGLBufferObjectPoolSize; }
bool makeSpace(unsigned int size);
GLBufferObject* generateGLBufferObject(const osg::BufferObject* bufferObject);
void handlePendingOrphandedGLBufferObjects();
void flushAllDeletedGLBufferObjects();
void discardAllDeletedGLBufferObjects();
void flushDeletedGLBufferObjects(double currentTime, double& availableTime);
void releaseGLBufferObject(GLBufferObject* to);
GLBufferObjectSet* getGLBufferObjectSet(const BufferObjectProfile& profile);
void newFrame(osg::FrameStamp* fs);
void resetStats();
void reportStats();
unsigned int& getFrameNumber() { return _frameNumber; }
unsigned int& getNumberFrames() { return _numFrames; }
unsigned int& getNumberDeleted() { return _numDeleted; }
double& getDeleteTime() { return _deleteTime; }
unsigned int& getNumberGenerated() { return _numGenerated; }
double& getGenerateTime() { return _generateTime; }
unsigned int& getNumberApplied() { return _numApplied; }
double& getApplyTime() { return _applyTime; }
static osg::ref_ptr<GLBufferObjectManager>& getGLBufferObjectManager(unsigned int contextID);
protected:
typedef std::map< BufferObjectProfile, osg::ref_ptr<GLBufferObjectSet> > GLBufferObjectSetMap;
unsigned int _contextID;
unsigned int _numActiveGLBufferObjects;
unsigned int _numOrphanedGLBufferObjects;
unsigned int _currGLBufferObjectPoolSize;
unsigned int _maxGLBufferObjectPoolSize;
GLBufferObjectSetMap _glBufferObjectSetMap;
unsigned int _frameNumber;
unsigned int _numFrames;
unsigned int _numDeleted;
double _deleteTime;
unsigned int _numGenerated;
double _generateTime;
unsigned int _numApplied;
double _applyTime;
};
class OSG_EXPORT BufferObject : public Object
{
public:
@ -294,18 +481,21 @@ class OSG_EXPORT BufferObject : public Object
virtual const char* libraryName() const { return "osg"; }
virtual const char* className() const { return "BufferObject"; }
void setTarget(GLenum target) { _target = target; }
GLenum getTarget() const { return _target; }
void setTarget(GLenum target) { _profile._target = target; }
GLenum getTarget() const { return _profile._target; }
/** Set what type of usage the buffer object will have. Options are:
* GL_STREAM_DRAW, GL_STREAM_READ, GL_STREAM_COPY,
* GL_STATIC_DRAW, GL_STATIC_READ, GL_STATIC_COPY,
* GL_DYNAMIC_DRAW, GL_DYNAMIC_READ, or GL_DYNAMIC_COPY.
*/
void setUsage(GLenum usage) { _usage = usage; }
void setUsage(GLenum usage) { _profile._usage = usage; }
/** Get the type of usage the buffer object has been set up for.*/
GLenum getUsage() const { return _usage; }
GLenum getUsage() const { return _profile._usage; }
BufferObjectProfile& getProfile() { return _profile; }
const BufferObjectProfile& getProfile() const { return _profile; }
void dirty();
@ -327,6 +517,8 @@ class OSG_EXPORT BufferObject : public Object
unsigned int getNumBufferData() const { return _bufferDataList.size(); }
void setGLBufferObject(unsigned int contextID, GLBufferObject* glbo) { _glBufferObjects[contextID] = glbo; }
GLBufferObject* getGLBufferObject(unsigned int contextID) const { return _glBufferObjects[contextID].get(); }
GLBufferObject* getOrCreateGLBufferObject(unsigned int contextID) const
@ -335,6 +527,8 @@ class OSG_EXPORT BufferObject : public Object
return _glBufferObjects[contextID].get();
}
unsigned int computeRequiredBufferSize() const;
protected:
~BufferObject();
@ -342,8 +536,8 @@ class OSG_EXPORT BufferObject : public Object
typedef std::vector< BufferData* > BufferDataList;
typedef osg::buffered_object< osg::ref_ptr<GLBufferObject> > GLBufferObjects;
GLenum _target;
GLenum _usage;
BufferObjectProfile _profile;
BufferDataList _bufferDataList;
mutable GLBufferObjects _glBufferObjects;
@ -487,10 +681,10 @@ class OSG_EXPORT PixelDataBufferObject : public BufferObject
META_Object(osg, PixelDataBufferObject);
//! Set new size of the buffer object. This will reallocate the memory on the next compile
inline void setDataSize(unsigned int size) { _dataSize = size; dirty(); }
inline void setDataSize(unsigned int size) { _profile._size = size; dirty(); }
//! Get data size of the used buffer
inline unsigned int getDataSize() const { return _dataSize; }
inline unsigned int getDataSize() const { return _profile._size; }
//! Compile the buffer (reallocate the memory if buffer is dirty)
virtual void compileBuffer(State& state) const;
@ -525,8 +719,6 @@ class OSG_EXPORT PixelDataBufferObject : public BufferObject
virtual ~PixelDataBufferObject();
unsigned int _dataSize;
typedef osg::buffered_value<unsigned int> ModeList;
mutable ModeList _mode;

View File

@ -203,11 +203,8 @@ class OSG_EXPORT DisplaySettings : public osg::Referenced
void setMaxTexturePoolSize(unsigned int size) { _maxTexturePoolSize = size; }
unsigned int getMaxTexturePoolSize() const { return _maxTexturePoolSize; }
void setMaxVBOPoolSize(unsigned int size) { _maxVBOPoolSize = size; }
unsigned int getMaxVBOPoolSize() const { return _maxVBOPoolSize; }
void setMaxFBOPoolSize(unsigned int size) { _maxFBOPoolSize = size; }
unsigned int getMaxFBOPoolSize() const { return _maxFBOPoolSize; }
void setMaxBufferObjectPoolSize(unsigned int size) { _maxBufferObjectPoolSize = size; }
unsigned int getMaxBufferObjectPoolSize() const { return _maxBufferObjectPoolSize; }
protected:
@ -251,8 +248,7 @@ class OSG_EXPORT DisplaySettings : public osg::Referenced
std::string _application;
unsigned int _maxTexturePoolSize;
unsigned int _maxVBOPoolSize;
unsigned int _maxFBOPoolSize;
unsigned int _maxBufferObjectPoolSize;
};
}

View File

@ -411,7 +411,7 @@ class OSG_EXPORT State : public Referenced, public Observer
{
if (vbo == _currentVBO) return;
if (vbo->isDirty()) vbo->compileBuffer();
else _glBindBuffer(GL_ARRAY_BUFFER_ARB,vbo->getGLObjectID());
else vbo->bindBuffer();
_currentVBO = vbo;
}
@ -429,7 +429,7 @@ class OSG_EXPORT State : public Referenced, public Observer
{
if (ebo == _currentEBO) return;
if (ebo->isDirty()) ebo->compileBuffer();
else _glBindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB,ebo->getGLObjectID());
else ebo->bindBuffer();
_currentEBO = ebo;
}
@ -448,7 +448,7 @@ class OSG_EXPORT State : public Referenced, public Observer
if (pbo == _currentPBO) return;
if (pbo->isDirty()) pbo->compileBuffer();
else _glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB,pbo->getGLObjectID());
else pbo->bindBuffer();
_currentPBO = pbo;
}
@ -1040,12 +1040,8 @@ class OSG_EXPORT State : public Referenced, public Observer
void setMaxTexturePoolSize(unsigned int size);
unsigned int getMaxTexturePoolSize() const { return _maxTexturePoolSize; }
void setMaxVBOPoolSize(unsigned int size);
unsigned int getMaxVBOPoolSize() const { return _maxVBOPoolSize; }
void setMaxFBOPoolSize(unsigned int size);
unsigned int getMaxFBOPoolSize() const { return _maxFBOPoolSize; }
void setMaxBufferObjectPoolSize(unsigned int size);
unsigned int getMaxBufferObjectPoolSize() const { return _maxBufferObjectPoolSize; }
enum CheckForGLErrors
@ -1233,8 +1229,7 @@ class OSG_EXPORT State : public Referenced, public Observer
StateSetStack _stateStateStack;
unsigned int _maxTexturePoolSize;
unsigned int _maxVBOPoolSize;
unsigned int _maxFBOPoolSize;
unsigned int _maxBufferObjectPoolSize;
struct EnabledArrayPair

View File

@ -1000,7 +1000,7 @@ class OSG_EXPORT Texture : public osg::StateAttribute
typedef std::list< ref_ptr<TextureObject> > TextureObjectList;
class TextureObjectSet : public Referenced
class OSG_EXPORT TextureObjectSet : public Referenced
{
public:
TextureObjectSet(TextureObjectManager* parent, const TextureProfile& profile);

File diff suppressed because it is too large Load Diff

View File

@ -82,8 +82,7 @@ void DisplaySettings::setDisplaySettings(const DisplaySettings& vs)
_application = vs._application;
_maxTexturePoolSize = vs._maxTexturePoolSize;
_maxVBOPoolSize = vs._maxVBOPoolSize;
_maxFBOPoolSize = vs._maxFBOPoolSize;
_maxBufferObjectPoolSize = vs._maxBufferObjectPoolSize;
}
void DisplaySettings::merge(const DisplaySettings& vs)
@ -109,8 +108,7 @@ void DisplaySettings::merge(const DisplaySettings& vs)
if (_application.empty()) _application = vs._application;
if (vs._maxTexturePoolSize>_maxTexturePoolSize) _maxTexturePoolSize = vs._maxTexturePoolSize;
if (vs._maxVBOPoolSize>_maxVBOPoolSize) _maxVBOPoolSize = vs._maxVBOPoolSize;
if (vs._maxFBOPoolSize>_maxFBOPoolSize) _maxFBOPoolSize = vs._maxFBOPoolSize;
if (vs._maxBufferObjectPoolSize>_maxBufferObjectPoolSize) _maxBufferObjectPoolSize = vs._maxBufferObjectPoolSize;
}
void DisplaySettings::setDefaults()
@ -157,8 +155,7 @@ void DisplaySettings::setDefaults()
_numHttpDatabaseThreadsHint = 1;
_maxTexturePoolSize = 0;
_maxVBOPoolSize = 0;
_maxFBOPoolSize = 0;
_maxBufferObjectPoolSize = 0;
}
void DisplaySettings::setMaxNumberOfGraphicsContexts(unsigned int num)
@ -199,7 +196,7 @@ static ApplicationUsageProxy DisplaySetting_e15(ApplicationUsage::ENVIRONMENTAL_
static ApplicationUsageProxy DisplaySetting_e16(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_NUM_HTTP_DATABASE_THREADS <int>","Set the hint for the total number of threads dedicated to http requests to set up in the DatabasePager.");
static ApplicationUsageProxy DisplaySetting_e17(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_MULTI_SAMPLES <int>","Set the hint for the number of samples to use when multi-sampling.");
static ApplicationUsageProxy DisplaySetting_e18(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_TEXTURE_POOL_SIZE <int>","Set the hint size of texture pool to manage.");
static ApplicationUsageProxy DisplaySetting_e19(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_VBO_POOL_SIZE <int>","Set the hint size of vertex buffer object pool to manage.");
static ApplicationUsageProxy DisplaySetting_e19(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_BUFFER_OBJECT_POOL_SIZE <int>","Set the hint size of vertex buffer object pool to manage.");
static ApplicationUsageProxy DisplaySetting_e20(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_FBO_POOL_SIZE <int>","Set the hint size of frame buffer object pool to manage.");
void DisplaySettings::readEnvironmentalVariables()
@ -403,14 +400,9 @@ void DisplaySettings::readEnvironmentalVariables()
_maxTexturePoolSize = atoi(ptr);
}
if( (ptr = getenv("OSG_VBO_POOL_SIZE")) != 0)
if( (ptr = getenv("OSG_BUFFER_OBJECT_POOL_SIZE")) != 0)
{
_maxVBOPoolSize = atoi(ptr);
}
if( (ptr = getenv("OSG_FBO_POOL_SIZE")) != 0)
{
_maxFBOPoolSize = atoi(ptr);
_maxBufferObjectPoolSize = atoi(ptr);
}
}
@ -500,8 +492,7 @@ void DisplaySettings::readCommandLine(ArgumentParser& arguments)
while(arguments.read("--num-http-threads",_numHttpDatabaseThreadsHint)) {}
while(arguments.read("--texture-pool-size",_maxTexturePoolSize)) {}
while(arguments.read("--vbo-pool-size",_maxVBOPoolSize)) {}
while(arguments.read("--fbo-pool-size",_maxFBOPoolSize)) {}
while(arguments.read("--buffer-object-pool-size",_maxBufferObjectPoolSize)) {}
}

View File

@ -53,7 +53,7 @@ void osg::flushAllDeletedGLObjects(unsigned int contextID)
void osg::discardAllDeletedGLObjects(unsigned int contextID)
{
osg::GLBufferObject::discardDeletedBufferObjects(contextID);
osg::GLBufferObject::discardAllDeletedBufferObjects(contextID);
osg::Drawable::discardAllDeletedDisplayLists(contextID);
osg::FragmentProgram::discardDeletedFragmentProgramObjects(contextID);
osg::FrameBufferObject::discardDeletedFrameBufferObjects(contextID);

View File

@ -89,8 +89,7 @@ State::State():
_glMaxTextureUnits = 1;
_maxTexturePoolSize = 0;
_maxVBOPoolSize = 0;
_maxFBOPoolSize = 0;
_maxBufferObjectPoolSize = 0;
}
State::~State()
@ -232,16 +231,11 @@ void State::setMaxTexturePoolSize(unsigned int size)
osg::notify(osg::NOTICE)<<"_maxTexturePoolSize="<<_maxTexturePoolSize<<std::endl;
}
void State::setMaxVBOPoolSize(unsigned int size)
void State::setMaxBufferObjectPoolSize(unsigned int size)
{
_maxVBOPoolSize = size;
osg::notify(osg::NOTICE)<<"_maxVBOPoolSize="<<_maxVBOPoolSize<<std::endl;
}
void State::setMaxFBOPoolSize(unsigned int size)
{
_maxFBOPoolSize = size;
osg::notify(osg::NOTICE)<<"_maxFBOPoolSize="<<_maxFBOPoolSize<<std::endl;
_maxBufferObjectPoolSize = size;
osg::GLBufferObjectManager::getGLBufferObjectManager(getContextID())->setMaxGLBufferObjectPoolSize(_maxBufferObjectPoolSize);
osg::notify(osg::NOTICE)<<"_maxBufferObjectPoolSize="<<_maxBufferObjectPoolSize<<std::endl;
}
void State::pushStateSet(const StateSet* dstate)

View File

@ -175,7 +175,7 @@ Texture::TextureObjectSet::~TextureObjectSet()
bool Texture::TextureObjectSet::checkConsistency() const
{
return true;
// return true;
// osg::notify(osg::NOTICE)<<"TextureObjectSet::checkConsistency()"<<std::endl;
// check consistency of linked list.
@ -265,7 +265,7 @@ void Texture::TextureObjectSet::flushAllDeletedTextureObjects()
GLuint id = (*itr)->id();
// osg::notify(osg::NOTICE)<<"Deleting textureobject id="<<id<<std::endl;
osg::notify(osg::NOTICE)<<"Deleting textureobject id="<<id<<std::endl;
glDeleteTextures( 1L, &id);
}
@ -327,7 +327,7 @@ void Texture::TextureObjectSet::flushDeletedTextureObjects(double currentTime, d
GLuint id = (*itr)->id();
// osg::notify(osg::NOTICE)<<"Deleting textureobject id="<<id<<std::endl;
osg::notify(osg::NOTICE)<<"Deleting textureobject id="<<id<<std::endl;
glDeleteTextures( 1L, &id);

View File

@ -1025,6 +1025,9 @@ void SceneView::draw()
osg::Texture::TextureObjectManager* tom = osg::Texture::getTextureObjectManager(state->getContextID());
tom->newFrame(state->getFrameStamp());
osg::GLBufferObjectManager::GLBufferObjectManager* bom = osg::GLBufferObjectManager::getGLBufferObjectManager(state->getContextID());
bom->newFrame(state->getFrameStamp());
if (!_initCalled) init();
// note, to support multi-pipe systems the deletion of OpenGL display list
@ -1566,6 +1569,7 @@ void SceneView::draw()
// #define REPORT_TEXTURE_MANAGER_STATS
#ifdef REPORT_TEXTURE_MANAGER_STATS
tom->reportStats();
bom->reportStats();
#endif
// osg::notify(osg::NOTICE)<<"SceneView draw() DynamicObjectCount"<<getState()->getDynamicObjectCount()<<std::endl;

View File

@ -541,8 +541,7 @@ void CompositeViewer::realize()
}
unsigned int maxTexturePoolSize = osg::DisplaySettings::instance()->getMaxTexturePoolSize();
unsigned int maxVBOPoolSize = osg::DisplaySettings::instance()->getMaxVBOPoolSize();
unsigned int maxFBOPoolSize = osg::DisplaySettings::instance()->getMaxFBOPoolSize();
unsigned int maxBufferObjectPoolSize = osg::DisplaySettings::instance()->getMaxBufferObjectPoolSize();
for(Contexts::iterator citr = contexts.begin();
citr != contexts.end();
@ -552,8 +551,7 @@ void CompositeViewer::realize()
// set the pool sizes, 0 the default will result in no GL object pools.
gc->getState()->setMaxTexturePoolSize(maxTexturePoolSize);
gc->getState()->setMaxVBOPoolSize(maxVBOPoolSize);
gc->getState()->setMaxFBOPoolSize(maxFBOPoolSize);
gc->getState()->setMaxBufferObjectPoolSize(maxBufferObjectPoolSize);
gc->realize();

View File

@ -1400,7 +1400,7 @@ void StatsHandler::setUpScene(osgViewer::ViewerBase* viewer)
viewStr << "Lights" << std::endl;
viewStr << "Bins" << std::endl;
viewStr << "Depth" << std::endl;
viewStr << "Matrices" << std::endl;
viewStr << "Materials" << std::endl;
viewStr << "Imposters" << std::endl;
viewStr << "Drawables" << std::endl;
viewStr << "Vertices" << std::endl;

View File

@ -481,13 +481,9 @@ void Viewer::realize()
if (_camera->getDisplaySettings()) maxTexturePoolSize = std::max(maxTexturePoolSize, _camera->getDisplaySettings()->getMaxTexturePoolSize());
if (_displaySettings.valid()) maxTexturePoolSize = std::max(maxTexturePoolSize, _displaySettings->getMaxTexturePoolSize());
unsigned int maxVBOPoolSize = osg::DisplaySettings::instance()->getMaxVBOPoolSize();
if (_displaySettings.valid()) maxVBOPoolSize = std::max(maxVBOPoolSize, _displaySettings->getMaxVBOPoolSize());
if (_camera->getDisplaySettings()) maxVBOPoolSize = std::max(maxVBOPoolSize, _camera->getDisplaySettings()->getMaxVBOPoolSize());
unsigned int maxFBOPoolSize = osg::DisplaySettings::instance()->getMaxFBOPoolSize();
if (_displaySettings.valid()) maxFBOPoolSize = std::max(maxFBOPoolSize, _displaySettings->getMaxFBOPoolSize());
if (_camera->getDisplaySettings()) maxFBOPoolSize = std::max(maxFBOPoolSize, _camera->getDisplaySettings()->getMaxFBOPoolSize());
unsigned int maxBufferObjectPoolSize = osg::DisplaySettings::instance()->getMaxBufferObjectPoolSize();
if (_displaySettings.valid()) maxBufferObjectPoolSize = std::max(maxBufferObjectPoolSize, _displaySettings->getMaxBufferObjectPoolSize());
if (_camera->getDisplaySettings()) maxBufferObjectPoolSize = std::max(maxBufferObjectPoolSize, _camera->getDisplaySettings()->getMaxBufferObjectPoolSize());
for(Contexts::iterator citr = contexts.begin();
citr != contexts.end();
@ -497,8 +493,7 @@ void Viewer::realize()
// set the pool sizes, 0 the default will result in no GL object pools.
gc->getState()->setMaxTexturePoolSize(maxTexturePoolSize);
gc->getState()->setMaxVBOPoolSize(maxVBOPoolSize);
gc->getState()->setMaxFBOPoolSize(maxFBOPoolSize);
gc->getState()->setMaxBufferObjectPoolSize(maxBufferObjectPoolSize);
gc->realize();

View File

@ -13,6 +13,7 @@
#include <osg/Array>
#include <osg/BufferObject>
#include <osg/CopyOp>
#include <osg/FrameStamp>
#include <osg/Image>
#include <osg/Object>
#include <osg/PrimitiveSet>
@ -173,6 +174,16 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::BufferObject)
__GLenum__getUsage,
"Get the type of usage the buffer object has been set up for. ",
"");
I_Method0(osg::BufferObjectProfile &, getProfile,
Properties::NON_VIRTUAL,
__BufferObjectProfile_R1__getProfile,
"",
"");
I_Method0(const osg::BufferObjectProfile &, getProfile,
Properties::NON_VIRTUAL,
__C5_BufferObjectProfile_R1__getProfile,
"",
"");
I_Method0(void, dirty,
Properties::NON_VIRTUAL,
__void__dirty,
@ -223,6 +234,11 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::BufferObject)
__unsigned_int__getNumBufferData,
"",
"");
I_Method2(void, setGLBufferObject, IN, unsigned int, contextID, IN, osg::GLBufferObject *, glbo,
Properties::NON_VIRTUAL,
__void__setGLBufferObject__unsigned_int__GLBufferObject_P1,
"",
"");
I_Method1(osg::GLBufferObject *, getGLBufferObject, IN, unsigned int, contextID,
Properties::NON_VIRTUAL,
__GLBufferObject_P1__getGLBufferObject__unsigned_int,
@ -233,6 +249,11 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::BufferObject)
__GLBufferObject_P1__getOrCreateGLBufferObject__unsigned_int,
"",
"");
I_Method0(unsigned int, computeRequiredBufferSize,
Properties::NON_VIRTUAL,
__unsigned_int__computeRequiredBufferSize,
"",
"");
I_ArrayProperty(osg::BufferData *, BufferData,
__BufferData_P1__getBufferData__unsigned_int,
__void__setBufferData__unsigned_int__BufferData_P1,
@ -240,6 +261,13 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::BufferObject)
__unsigned_int__addBufferData__BufferData_P1,
0,
__void__removeBufferData__unsigned_int);
I_IndexedProperty(osg::GLBufferObject *, GLBufferObject,
__GLBufferObject_P1__getGLBufferObject__unsigned_int,
__void__setGLBufferObject__unsigned_int__GLBufferObject_P1,
0);
I_SimpleProperty(osg::BufferObjectProfile &, Profile,
__BufferObjectProfile_R1__getProfile,
0);
I_SimpleProperty(GLenum, Target,
__GLenum__getTarget,
__void__setTarget__GLenum);
@ -248,6 +276,30 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::BufferObject)
__void__setUsage__GLenum);
END_REFLECTOR
BEGIN_VALUE_REFLECTOR(osg::BufferObjectProfile)
I_DeclaringFile("osg/BufferObject");
I_Constructor0(____BufferObjectProfile,
"",
"");
I_Constructor3(IN, GLenum, target, IN, GLenum, usage, IN, unsigned int, size,
____BufferObjectProfile__GLenum__GLenum__unsigned_int,
"",
"");
I_Constructor1(IN, const osg::BufferObjectProfile &, bpo,
Properties::NON_EXPLICIT,
____BufferObjectProfile__C5_BufferObjectProfile_R1,
"",
"");
I_Method3(void, setProfile, IN, GLenum, target, IN, GLenum, usage, IN, unsigned int, size,
Properties::NON_VIRTUAL,
__void__setProfile__GLenum__GLenum__unsigned_int,
"",
"");
I_PublicMemberProperty(GLenum, _target);
I_PublicMemberProperty(GLenum, _usage);
I_PublicMemberProperty(GLenum, _size);
END_REFLECTOR
BEGIN_OBJECT_REFLECTOR(osg::ElementBufferObject)
I_DeclaringFile("osg/BufferObject");
I_BaseType(osg::BufferObject);
@ -321,6 +373,16 @@ BEGIN_OBJECT_REFLECTOR(osg::GLBufferObject)
____GLBufferObject__unsigned_int__BufferObject_P1,
"",
"");
I_Method1(void, setProfile, IN, const osg::BufferObjectProfile &, profile,
Properties::NON_VIRTUAL,
__void__setProfile__C5_BufferObjectProfile_R1,
"",
"");
I_Method0(const osg::BufferObjectProfile &, getProfile,
Properties::NON_VIRTUAL,
__C5_BufferObjectProfile_R1__getProfile,
"",
"");
I_Method1(void, setBufferObject, IN, osg::BufferObject *, bufferObject,
Properties::NON_VIRTUAL,
__void__setBufferObject__BufferObject_P1,
@ -404,14 +466,22 @@ BEGIN_OBJECT_REFLECTOR(osg::GLBufferObject)
__void__deleteBufferObject__unsigned_int__GLuint_S,
"Use deleteVertexBufferObject instead of glDeleteBuffers to allow OpenGL buffer objects to be cached until they can be deleted by the OpenGL context in which they were created, specified by contextID. ",
"");
I_StaticMethod3(void, flushDeletedBufferObjects, IN, unsigned int, contextID, IN, double, x, IN, double &, availableTime,
__void__flushDeletedBufferObjects__unsigned_int__double__double_R1_S,
"flush all the cached display list which need to be deleted in the OpenGL context related to contextID. ",
I_StaticMethod1(void, flushAllDeletedBufferObjects, IN, unsigned int, contextID,
__void__flushAllDeletedBufferObjects__unsigned_int_S,
"",
"");
I_StaticMethod1(void, discardAllDeletedBufferObjects, IN, unsigned int, contextID,
__void__discardAllDeletedBufferObjects__unsigned_int_S,
"",
"");
I_StaticMethod3(void, flushDeletedBufferObjects, IN, unsigned int, contextID, IN, double, currentTime, IN, double &, availbleTime,
__void__flushDeletedBufferObjects__unsigned_int__double__double_R1_S,
"",
"");
I_StaticMethod2(void, releaseGLBufferObject, IN, unsigned int, contextID, IN, osg::GLBufferObject *, to,
__void__releaseGLBufferObject__unsigned_int__GLBufferObject_P1_S,
"",
"");
I_StaticMethod1(void, discardDeletedBufferObjects, IN, unsigned int, contextID,
__void__discardDeletedBufferObjects__unsigned_int_S,
"dicard all the cached display list which need to be deleted in the OpenGL context related to contextID. ",
"Note, unlike flush no OpenGL calls are made, instead the handles are all removed. this call is useful for when an OpenGL context has been destroyed. ");
I_StaticMethod2(osg::GLBufferObject::Extensions *, getExtensions, IN, unsigned int, contextID, IN, bool, createIfNotInitalized,
__Extensions_P1__getExtensions__unsigned_int__bool_S,
"Function to call to get the extension of a specified context. ",
@ -429,6 +499,13 @@ BEGIN_OBJECT_REFLECTOR(osg::GLBufferObject)
I_SimpleProperty(GLuint, GLObjectID,
__GLuint__getGLObjectID,
0);
I_SimpleProperty(const osg::BufferObjectProfile &, Profile,
__C5_BufferObjectProfile_R1__getProfile,
__void__setProfile__C5_BufferObjectProfile_R1);
I_PublicMemberProperty(osg::GLBufferObjectSet *, _set);
I_PublicMemberProperty(osg::GLBufferObject *, _previous);
I_PublicMemberProperty(osg::GLBufferObject *, _next);
I_PublicMemberProperty(unsigned int, _frameLastUsed);
I_PublicMemberProperty(osg::GLBufferObject::Extensions *, _extensions);
END_REFLECTOR
@ -448,6 +525,301 @@ BEGIN_VALUE_REFLECTOR(osg::GLBufferObject::BufferEntry)
I_PublicMemberProperty(osg::BufferData *, dataSource);
END_REFLECTOR
BEGIN_OBJECT_REFLECTOR(osg::GLBufferObjectManager)
I_DeclaringFile("osg/BufferObject");
I_BaseType(osg::Referenced);
I_Constructor1(IN, unsigned int, contextID,
Properties::NON_EXPLICIT,
____GLBufferObjectManager__unsigned_int,
"",
"");
I_Method0(unsigned int, getContextID,
Properties::NON_VIRTUAL,
__unsigned_int__getContextID,
"",
"");
I_Method1(void, setNumberActiveGLBufferObjects, IN, unsigned int, size,
Properties::NON_VIRTUAL,
__void__setNumberActiveGLBufferObjects__unsigned_int,
"",
"");
I_Method0(unsigned int &, getNumberActiveGLBufferObjects,
Properties::NON_VIRTUAL,
__unsigned_int_R1__getNumberActiveGLBufferObjects,
"",
"");
I_Method0(unsigned int, getNumberActiveGLBufferObjects,
Properties::NON_VIRTUAL,
__unsigned_int__getNumberActiveGLBufferObjects,
"",
"");
I_Method1(void, setNumberOrphanedGLBufferObjects, IN, unsigned int, size,
Properties::NON_VIRTUAL,
__void__setNumberOrphanedGLBufferObjects__unsigned_int,
"",
"");
I_Method0(unsigned int &, getNumberOrphanedGLBufferObjects,
Properties::NON_VIRTUAL,
__unsigned_int_R1__getNumberOrphanedGLBufferObjects,
"",
"");
I_Method0(unsigned int, getNumberOrphanedGLBufferObjects,
Properties::NON_VIRTUAL,
__unsigned_int__getNumberOrphanedGLBufferObjects,
"",
"");
I_Method1(void, setCurrGLBufferObjectPoolSize, IN, unsigned int, size,
Properties::NON_VIRTUAL,
__void__setCurrGLBufferObjectPoolSize__unsigned_int,
"",
"");
I_Method0(unsigned int &, getCurrGLBufferObjectPoolSize,
Properties::NON_VIRTUAL,
__unsigned_int_R1__getCurrGLBufferObjectPoolSize,
"",
"");
I_Method0(unsigned int, getCurrGLBufferObjectPoolSize,
Properties::NON_VIRTUAL,
__unsigned_int__getCurrGLBufferObjectPoolSize,
"",
"");
I_Method1(void, setMaxGLBufferObjectPoolSize, IN, unsigned int, size,
Properties::NON_VIRTUAL,
__void__setMaxGLBufferObjectPoolSize__unsigned_int,
"",
"");
I_Method0(unsigned int, getMaxGLBufferObjectPoolSize,
Properties::NON_VIRTUAL,
__unsigned_int__getMaxGLBufferObjectPoolSize,
"",
"");
I_Method1(bool, hasSpace, IN, unsigned int, size,
Properties::NON_VIRTUAL,
__bool__hasSpace__unsigned_int,
"",
"");
I_Method1(bool, makeSpace, IN, unsigned int, size,
Properties::NON_VIRTUAL,
__bool__makeSpace__unsigned_int,
"",
"");
I_Method1(osg::GLBufferObject *, generateGLBufferObject, IN, const osg::BufferObject *, bufferObject,
Properties::NON_VIRTUAL,
__GLBufferObject_P1__generateGLBufferObject__C5_osg_BufferObject_P1,
"",
"");
I_Method0(void, handlePendingOrphandedGLBufferObjects,
Properties::NON_VIRTUAL,
__void__handlePendingOrphandedGLBufferObjects,
"",
"");
I_Method0(void, flushAllDeletedGLBufferObjects,
Properties::NON_VIRTUAL,
__void__flushAllDeletedGLBufferObjects,
"",
"");
I_Method0(void, discardAllDeletedGLBufferObjects,
Properties::NON_VIRTUAL,
__void__discardAllDeletedGLBufferObjects,
"",
"");
I_Method2(void, flushDeletedGLBufferObjects, IN, double, currentTime, IN, double &, availableTime,
Properties::NON_VIRTUAL,
__void__flushDeletedGLBufferObjects__double__double_R1,
"",
"");
I_Method1(void, releaseGLBufferObject, IN, osg::GLBufferObject *, to,
Properties::NON_VIRTUAL,
__void__releaseGLBufferObject__GLBufferObject_P1,
"",
"");
I_Method1(osg::GLBufferObjectSet *, getGLBufferObjectSet, IN, const osg::BufferObjectProfile &, profile,
Properties::NON_VIRTUAL,
__GLBufferObjectSet_P1__getGLBufferObjectSet__C5_BufferObjectProfile_R1,
"",
"");
I_Method1(void, newFrame, IN, osg::FrameStamp *, fs,
Properties::NON_VIRTUAL,
__void__newFrame__osg_FrameStamp_P1,
"",
"");
I_Method0(void, resetStats,
Properties::NON_VIRTUAL,
__void__resetStats,
"",
"");
I_Method0(void, reportStats,
Properties::NON_VIRTUAL,
__void__reportStats,
"",
"");
I_Method0(unsigned int &, getFrameNumber,
Properties::NON_VIRTUAL,
__unsigned_int_R1__getFrameNumber,
"",
"");
I_Method0(unsigned int &, getNumberFrames,
Properties::NON_VIRTUAL,
__unsigned_int_R1__getNumberFrames,
"",
"");
I_Method0(unsigned int &, getNumberDeleted,
Properties::NON_VIRTUAL,
__unsigned_int_R1__getNumberDeleted,
"",
"");
I_Method0(double &, getDeleteTime,
Properties::NON_VIRTUAL,
__double_R1__getDeleteTime,
"",
"");
I_Method0(unsigned int &, getNumberGenerated,
Properties::NON_VIRTUAL,
__unsigned_int_R1__getNumberGenerated,
"",
"");
I_Method0(double &, getGenerateTime,
Properties::NON_VIRTUAL,
__double_R1__getGenerateTime,
"",
"");
I_Method0(unsigned int &, getNumberApplied,
Properties::NON_VIRTUAL,
__unsigned_int_R1__getNumberApplied,
"",
"");
I_Method0(double &, getApplyTime,
Properties::NON_VIRTUAL,
__double_R1__getApplyTime,
"",
"");
I_StaticMethod1(osg::ref_ptr< osg::GLBufferObjectManager > &, getGLBufferObjectManager, IN, unsigned int, contextID,
__osg_ref_ptrT1_GLBufferObjectManager__R1__getGLBufferObjectManager__unsigned_int_S,
"",
"");
I_SimpleProperty(double &, ApplyTime,
__double_R1__getApplyTime,
0);
I_SimpleProperty(unsigned int, ContextID,
__unsigned_int__getContextID,
0);
I_SimpleProperty(unsigned int, CurrGLBufferObjectPoolSize,
__unsigned_int__getCurrGLBufferObjectPoolSize,
__void__setCurrGLBufferObjectPoolSize__unsigned_int);
I_SimpleProperty(double &, DeleteTime,
__double_R1__getDeleteTime,
0);
I_SimpleProperty(unsigned int &, FrameNumber,
__unsigned_int_R1__getFrameNumber,
0);
I_SimpleProperty(double &, GenerateTime,
__double_R1__getGenerateTime,
0);
I_SimpleProperty(unsigned int, MaxGLBufferObjectPoolSize,
__unsigned_int__getMaxGLBufferObjectPoolSize,
__void__setMaxGLBufferObjectPoolSize__unsigned_int);
I_SimpleProperty(unsigned int, NumberActiveGLBufferObjects,
__unsigned_int__getNumberActiveGLBufferObjects,
__void__setNumberActiveGLBufferObjects__unsigned_int);
I_SimpleProperty(unsigned int &, NumberApplied,
__unsigned_int_R1__getNumberApplied,
0);
I_SimpleProperty(unsigned int &, NumberDeleted,
__unsigned_int_R1__getNumberDeleted,
0);
I_SimpleProperty(unsigned int &, NumberFrames,
__unsigned_int_R1__getNumberFrames,
0);
I_SimpleProperty(unsigned int &, NumberGenerated,
__unsigned_int_R1__getNumberGenerated,
0);
I_SimpleProperty(unsigned int, NumberOrphanedGLBufferObjects,
__unsigned_int__getNumberOrphanedGLBufferObjects,
__void__setNumberOrphanedGLBufferObjects__unsigned_int);
END_REFLECTOR
BEGIN_OBJECT_REFLECTOR(osg::GLBufferObjectSet)
I_DeclaringFile("osg/BufferObject");
I_BaseType(osg::Referenced);
I_Constructor2(IN, osg::GLBufferObjectManager *, parent, IN, const osg::BufferObjectProfile &, profile,
____GLBufferObjectSet__GLBufferObjectManager_P1__C5_BufferObjectProfile_R1,
"",
"");
I_Method0(void, handlePendingOrphandedGLBufferObjects,
Properties::NON_VIRTUAL,
__void__handlePendingOrphandedGLBufferObjects,
"",
"");
I_Method0(void, flushAllDeletedGLBufferObjects,
Properties::NON_VIRTUAL,
__void__flushAllDeletedGLBufferObjects,
"",
"");
I_Method0(void, discardAllDeletedGLBufferObjects,
Properties::NON_VIRTUAL,
__void__discardAllDeletedGLBufferObjects,
"",
"");
I_Method2(void, flushDeletedGLBufferObjects, IN, double, currentTime, IN, double &, availableTime,
Properties::NON_VIRTUAL,
__void__flushDeletedGLBufferObjects__double__double_R1,
"",
"");
I_Method1(osg::GLBufferObject *, takeFromOrphans, IN, osg::BufferObject *, bufferObject,
Properties::NON_VIRTUAL,
__GLBufferObject_P1__takeFromOrphans__BufferObject_P1,
"",
"");
I_Method1(osg::GLBufferObject *, takeOrGenerate, IN, osg::BufferObject *, bufferObject,
Properties::NON_VIRTUAL,
__GLBufferObject_P1__takeOrGenerate__BufferObject_P1,
"",
"");
I_Method1(void, moveToBack, IN, osg::GLBufferObject *, to,
Properties::NON_VIRTUAL,
__void__moveToBack__GLBufferObject_P1,
"",
"");
I_Method1(void, addToBack, IN, osg::GLBufferObject *, to,
Properties::NON_VIRTUAL,
__void__addToBack__GLBufferObject_P1,
"",
"");
I_Method1(void, orphan, IN, osg::GLBufferObject *, to,
Properties::NON_VIRTUAL,
__void__orphan__GLBufferObject_P1,
"",
"");
I_Method1(void, remove, IN, osg::GLBufferObject *, to,
Properties::NON_VIRTUAL,
__void__remove__GLBufferObject_P1,
"",
"");
I_Method0(unsigned int, size,
Properties::NON_VIRTUAL,
__unsigned_int__size,
"",
"");
I_Method1(bool, makeSpace, IN, unsigned int &, size,
Properties::NON_VIRTUAL,
__bool__makeSpace__unsigned_int_R1,
"",
"");
I_Method0(bool, checkConsistency,
Properties::NON_VIRTUAL,
__bool__checkConsistency,
"",
"");
I_Method0(osg::GLBufferObjectManager *, getParent,
Properties::NON_VIRTUAL,
__GLBufferObjectManager_P1__getParent,
"",
"");
I_SimpleProperty(osg::GLBufferObjectManager *, Parent,
__GLBufferObjectManager_P1__getParent,
0);
END_REFLECTOR
BEGIN_OBJECT_REFLECTOR(osg::PixelBufferObject)
I_DeclaringFile("osg/BufferObject");
I_BaseType(osg::BufferObject);
@ -663,3 +1035,87 @@ BEGIN_OBJECT_REFLECTOR(osg::VertexBufferObject)
0);
END_REFLECTOR
TYPE_NAME_ALIAS(std::list< osg::ref_ptr< osg::GLBufferObject > >, osg::GLBufferObjectList)
BEGIN_VALUE_REFLECTOR(osg::ref_ptr< osg::GLBufferObject >)
I_DeclaringFile("osg/ref_ptr");
I_Constructor0(____ref_ptr,
"",
"");
I_Constructor1(IN, osg::GLBufferObject *, ptr,
Properties::NON_EXPLICIT,
____ref_ptr__T_P1,
"",
"");
I_Constructor1(IN, const osg::ref_ptr< osg::GLBufferObject > &, rp,
Properties::NON_EXPLICIT,
____ref_ptr__C5_ref_ptr_R1,
"",
"");
I_Method0(osg::GLBufferObject *, get,
Properties::NON_VIRTUAL,
__T_P1__get,
"",
"");
I_Method0(bool, valid,
Properties::NON_VIRTUAL,
__bool__valid,
"",
"");
I_Method0(osg::GLBufferObject *, release,
Properties::NON_VIRTUAL,
__T_P1__release,
"",
"");
I_Method1(void, swap, IN, osg::ref_ptr< osg::GLBufferObject > &, rp,
Properties::NON_VIRTUAL,
__void__swap__ref_ptr_R1,
"",
"");
I_SimpleProperty(osg::GLBufferObject *, ,
__T_P1__get,
0);
END_REFLECTOR
BEGIN_VALUE_REFLECTOR(osg::ref_ptr< osg::GLBufferObjectManager >)
I_DeclaringFile("osg/ref_ptr");
I_Constructor0(____ref_ptr,
"",
"");
I_Constructor1(IN, osg::GLBufferObjectManager *, ptr,
Properties::NON_EXPLICIT,
____ref_ptr__T_P1,
"",
"");
I_Constructor1(IN, const osg::ref_ptr< osg::GLBufferObjectManager > &, rp,
Properties::NON_EXPLICIT,
____ref_ptr__C5_ref_ptr_R1,
"",
"");
I_Method0(osg::GLBufferObjectManager *, get,
Properties::NON_VIRTUAL,
__T_P1__get,
"",
"");
I_Method0(bool, valid,
Properties::NON_VIRTUAL,
__bool__valid,
"",
"");
I_Method0(osg::GLBufferObjectManager *, release,
Properties::NON_VIRTUAL,
__T_P1__release,
"",
"");
I_Method1(void, swap, IN, osg::ref_ptr< osg::GLBufferObjectManager > &, rp,
Properties::NON_VIRTUAL,
__void__swap__ref_ptr_R1,
"",
"");
I_SimpleProperty(osg::GLBufferObjectManager *, ,
__T_P1__get,
0);
END_REFLECTOR
STD_LIST_REFLECTOR(std::list< osg::ref_ptr< osg::GLBufferObject > >)

View File

@ -394,24 +394,14 @@ BEGIN_OBJECT_REFLECTOR(osg::DisplaySettings)
__unsigned_int__getMaxTexturePoolSize,
"",
"");
I_Method1(void, setMaxVBOPoolSize, IN, unsigned int, size,
I_Method1(void, setMaxBufferObjectPoolSize, IN, unsigned int, size,
Properties::NON_VIRTUAL,
__void__setMaxVBOPoolSize__unsigned_int,
__void__setMaxBufferObjectPoolSize__unsigned_int,
"",
"");
I_Method0(unsigned int, getMaxVBOPoolSize,
I_Method0(unsigned int, getMaxBufferObjectPoolSize,
Properties::NON_VIRTUAL,
__unsigned_int__getMaxVBOPoolSize,
"",
"");
I_Method1(void, setMaxFBOPoolSize, IN, unsigned int, size,
Properties::NON_VIRTUAL,
__void__setMaxFBOPoolSize__unsigned_int,
"",
"");
I_Method0(unsigned int, getMaxFBOPoolSize,
Properties::NON_VIRTUAL,
__unsigned_int__getMaxFBOPoolSize,
__unsigned_int__getMaxBufferObjectPoolSize,
"",
"");
I_SimpleProperty(bool, AccumBuffer,
@ -441,18 +431,15 @@ BEGIN_OBJECT_REFLECTOR(osg::DisplaySettings)
I_SimpleProperty(float, EyeSeparation,
__float__getEyeSeparation,
__void__setEyeSeparation__float);
I_SimpleProperty(unsigned int, MaxFBOPoolSize,
__unsigned_int__getMaxFBOPoolSize,
__void__setMaxFBOPoolSize__unsigned_int);
I_SimpleProperty(unsigned int, MaxBufferObjectPoolSize,
__unsigned_int__getMaxBufferObjectPoolSize,
__void__setMaxBufferObjectPoolSize__unsigned_int);
I_SimpleProperty(unsigned int, MaxNumberOfGraphicsContexts,
__unsigned_int__getMaxNumberOfGraphicsContexts,
__void__setMaxNumberOfGraphicsContexts__unsigned_int);
I_SimpleProperty(unsigned int, MaxTexturePoolSize,
__unsigned_int__getMaxTexturePoolSize,
__void__setMaxTexturePoolSize__unsigned_int);
I_SimpleProperty(unsigned int, MaxVBOPoolSize,
__unsigned_int__getMaxVBOPoolSize,
__void__setMaxVBOPoolSize__unsigned_int);
I_SimpleProperty(unsigned int, MinimumNumAccumAlphaBits,
__unsigned_int__getMinimumNumAccumAlphaBits,
0);

View File

@ -706,24 +706,14 @@ BEGIN_OBJECT_REFLECTOR(osg::State)
__unsigned_int__getMaxTexturePoolSize,
"",
"");
I_Method1(void, setMaxVBOPoolSize, IN, unsigned int, size,
I_Method1(void, setMaxBufferObjectPoolSize, IN, unsigned int, size,
Properties::NON_VIRTUAL,
__void__setMaxVBOPoolSize__unsigned_int,
__void__setMaxBufferObjectPoolSize__unsigned_int,
"",
"");
I_Method0(unsigned int, getMaxVBOPoolSize,
I_Method0(unsigned int, getMaxBufferObjectPoolSize,
Properties::NON_VIRTUAL,
__unsigned_int__getMaxVBOPoolSize,
"",
"");
I_Method1(void, setMaxFBOPoolSize, IN, unsigned int, size,
Properties::NON_VIRTUAL,
__void__setMaxFBOPoolSize__unsigned_int,
"",
"");
I_Method0(unsigned int, getMaxFBOPoolSize,
Properties::NON_VIRTUAL,
__unsigned_int__getMaxFBOPoolSize,
__unsigned_int__getMaxBufferObjectPoolSize,
"",
"");
I_Method1(void, setCheckForGLErrors, IN, osg::State::CheckForGLErrors, check,
@ -880,15 +870,12 @@ BEGIN_OBJECT_REFLECTOR(osg::State)
I_SimpleProperty(const osg::Program::PerContextProgram *, LastAppliedProgramObject,
__C5_Program_PerContextProgram_P1__getLastAppliedProgramObject,
__void__setLastAppliedProgramObject__C5_Program_PerContextProgram_P1);
I_SimpleProperty(unsigned int, MaxFBOPoolSize,
__unsigned_int__getMaxFBOPoolSize,
__void__setMaxFBOPoolSize__unsigned_int);
I_SimpleProperty(unsigned int, MaxBufferObjectPoolSize,
__unsigned_int__getMaxBufferObjectPoolSize,
__void__setMaxBufferObjectPoolSize__unsigned_int);
I_SimpleProperty(unsigned int, MaxTexturePoolSize,
__unsigned_int__getMaxTexturePoolSize,
__void__setMaxTexturePoolSize__unsigned_int);
I_SimpleProperty(unsigned int, MaxVBOPoolSize,
__unsigned_int__getMaxVBOPoolSize,
__void__setMaxVBOPoolSize__unsigned_int);
I_IndexedProperty(bool, ModeValidity,
__bool__getModeValidity__StateAttribute_GLMode,
__void__setModeValidity__StateAttribute_GLMode__bool,