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

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,