Show
Ignore:
Timestamp:
10/03/09 11:25:23 (4 years ago)
Author:
robert
Message:

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

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgViewer/Viewer.cpp

    r10588 r10601  
    482482    if (_displaySettings.valid()) maxTexturePoolSize = std::max(maxTexturePoolSize, _displaySettings->getMaxTexturePoolSize()); 
    483483 
    484     unsigned int maxVBOPoolSize = osg::DisplaySettings::instance()->getMaxVBOPoolSize(); 
    485     if (_displaySettings.valid()) maxVBOPoolSize = std::max(maxVBOPoolSize, _displaySettings->getMaxVBOPoolSize()); 
    486     if (_camera->getDisplaySettings()) maxVBOPoolSize = std::max(maxVBOPoolSize, _camera->getDisplaySettings()->getMaxVBOPoolSize()); 
    487  
    488     unsigned int maxFBOPoolSize = osg::DisplaySettings::instance()->getMaxFBOPoolSize(); 
    489     if (_displaySettings.valid()) maxFBOPoolSize = std::max(maxFBOPoolSize, _displaySettings->getMaxFBOPoolSize()); 
    490     if (_camera->getDisplaySettings()) maxFBOPoolSize = std::max(maxFBOPoolSize, _camera->getDisplaySettings()->getMaxFBOPoolSize()); 
     484    unsigned int maxBufferObjectPoolSize = osg::DisplaySettings::instance()->getMaxBufferObjectPoolSize(); 
     485    if (_displaySettings.valid()) maxBufferObjectPoolSize = std::max(maxBufferObjectPoolSize, _displaySettings->getMaxBufferObjectPoolSize()); 
     486    if (_camera->getDisplaySettings()) maxBufferObjectPoolSize = std::max(maxBufferObjectPoolSize, _camera->getDisplaySettings()->getMaxBufferObjectPoolSize()); 
    491487 
    492488    for(Contexts::iterator citr = contexts.begin(); 
     
    498494        // set the pool sizes, 0 the default will result in no GL object pools. 
    499495        gc->getState()->setMaxTexturePoolSize(maxTexturePoolSize); 
    500         gc->getState()->setMaxVBOPoolSize(maxVBOPoolSize); 
    501         gc->getState()->setMaxFBOPoolSize(maxFBOPoolSize); 
     496        gc->getState()->setMaxBufferObjectPoolSize(maxBufferObjectPoolSize); 
    502497 
    503498        gc->realize();