Introduced new GLBufferObject pool for managing the memory footprint taken up by VertexBufferObejct, ElementBufferObject and PixelBufferObject.
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user