Changeset 10588 for OpenSceneGraph/trunk/src/osg/DisplaySettings.cpp
- Timestamp:
- 09/22/09 20:45:24 (4 years ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/src/osg/DisplaySettings.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osg/DisplaySettings.cpp
r10415 r10588 81 81 82 82 _application = vs._application; 83 84 _maxTexturePoolSize = vs._maxTexturePoolSize; 85 _maxVBOPoolSize = vs._maxVBOPoolSize; 86 _maxFBOPoolSize = vs._maxFBOPoolSize; 83 87 } 84 88 … … 104 108 105 109 if (_application.empty()) _application = vs._application; 110 111 if (vs._maxTexturePoolSize>_maxTexturePoolSize) _maxTexturePoolSize = vs._maxTexturePoolSize; 112 if (vs._maxVBOPoolSize>_maxVBOPoolSize) _maxVBOPoolSize = vs._maxVBOPoolSize; 113 if (vs._maxFBOPoolSize>_maxFBOPoolSize) _maxFBOPoolSize = vs._maxFBOPoolSize; 106 114 } 107 115 … … 148 156 _numDatabaseThreadsHint = 2; 149 157 _numHttpDatabaseThreadsHint = 1; 158 159 _maxTexturePoolSize = 0; 160 _maxVBOPoolSize = 0; 161 _maxFBOPoolSize = 0; 150 162 } 151 163 … … 187 199 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."); 188 200 static ApplicationUsageProxy DisplaySetting_e17(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_MULTI_SAMPLES <int>","Set the hint for the number of samples to use when multi-sampling."); 201 static 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."); 203 static ApplicationUsageProxy DisplaySetting_e20(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_FBO_POOL_SIZE <int>","Set the hint size of frame buffer object pool to manage."); 189 204 190 205 void DisplaySettings::readEnvironmentalVariables() … … 382 397 { 383 398 _numMultiSamples = atoi(ptr); 399 } 400 401 if( (ptr = getenv("OSG_TEXTURE_POOL_SIZE")) != 0) 402 { 403 _maxTexturePoolSize = atoi(ptr); 404 } 405 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); 384 414 } 385 415 } … … 469 499 while(arguments.read("--num-db-threads",_numDatabaseThreadsHint)) {} 470 500 while(arguments.read("--num-http-threads",_numHttpDatabaseThreadsHint)) {} 471 } 501 502 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
