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/osg/DisplaySettings.cpp

    r10588 r10601  
    8383 
    8484    _maxTexturePoolSize = vs._maxTexturePoolSize; 
    85     _maxVBOPoolSize = vs._maxVBOPoolSize; 
    86     _maxFBOPoolSize = vs._maxFBOPoolSize; 
     85    _maxBufferObjectPoolSize = vs._maxBufferObjectPoolSize; 
    8786} 
    8887 
     
    110109 
    111110    if (vs._maxTexturePoolSize>_maxTexturePoolSize) _maxTexturePoolSize = vs._maxTexturePoolSize; 
    112     if (vs._maxVBOPoolSize>_maxVBOPoolSize) _maxVBOPoolSize = vs._maxVBOPoolSize; 
    113     if (vs._maxFBOPoolSize>_maxFBOPoolSize) _maxFBOPoolSize = vs._maxFBOPoolSize; 
     111    if (vs._maxBufferObjectPoolSize>_maxBufferObjectPoolSize) _maxBufferObjectPoolSize = vs._maxBufferObjectPoolSize; 
    114112} 
    115113 
     
    158156 
    159157    _maxTexturePoolSize = 0; 
    160     _maxVBOPoolSize = 0; 
    161     _maxFBOPoolSize = 0; 
     158    _maxBufferObjectPoolSize = 0; 
    162159} 
    163160 
     
    200197static ApplicationUsageProxy DisplaySetting_e17(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_MULTI_SAMPLES <int>","Set the hint for the number of samples to use when multi-sampling."); 
    201198static ApplicationUsageProxy DisplaySetting_e18(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_TEXTURE_POOL_SIZE <int>","Set the hint size of texture pool to manage."); 
    202 static ApplicationUsageProxy DisplaySetting_e19(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_VBO_POOL_SIZE <int>","Set the hint size of vertex buffer object pool to manage."); 
     199static ApplicationUsageProxy DisplaySetting_e19(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_BUFFER_OBJECT_POOL_SIZE <int>","Set the hint size of vertex buffer object pool to manage."); 
    203200static ApplicationUsageProxy DisplaySetting_e20(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_FBO_POOL_SIZE <int>","Set the hint size of frame buffer object pool to manage."); 
    204201 
     
    404401    } 
    405402 
    406     if( (ptr = getenv("OSG_VBO_POOL_SIZE")) != 0) 
    407     { 
    408         _maxVBOPoolSize = atoi(ptr); 
    409     } 
    410  
    411     if( (ptr = getenv("OSG_FBO_POOL_SIZE")) != 0) 
    412     { 
    413         _maxFBOPoolSize = atoi(ptr); 
     403    if( (ptr = getenv("OSG_BUFFER_OBJECT_POOL_SIZE")) != 0) 
     404    { 
     405        _maxBufferObjectPoolSize = atoi(ptr); 
    414406    } 
    415407} 
     
    501493 
    502494    while(arguments.read("--texture-pool-size",_maxTexturePoolSize)) {} 
    503     while(arguments.read("--vbo-pool-size",_maxVBOPoolSize)) {} 
    504     while(arguments.read("--fbo-pool-size",_maxFBOPoolSize)) {} 
    505  
    506 } 
    507  
    508  
    509  
     495    while(arguments.read("--buffer-object-pool-size",_maxBufferObjectPoolSize)) {} 
     496 
     497} 
     498 
     499 
     500