Changeset 10740 for OpenSceneGraph/trunk/src/osg/DisplaySettings.cpp
- Timestamp:
- 11/11/09 16:25:42 (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
r10601 r10740 84 84 _maxTexturePoolSize = vs._maxTexturePoolSize; 85 85 _maxBufferObjectPoolSize = vs._maxBufferObjectPoolSize; 86 87 _glContextVersion = vs._glContextVersion; 88 _glContextFlags = vs._glContextFlags; 89 _glContextProfileMask = vs._glContextProfileMask; 86 90 } 87 91 … … 157 161 _maxTexturePoolSize = 0; 158 162 _maxBufferObjectPoolSize = 0; 163 164 _glContextVersion = "1.0"; 165 _glContextFlags = 0; 166 _glContextProfileMask = 0; 159 167 } 160 168 … … 199 207 static ApplicationUsageProxy DisplaySetting_e19(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_BUFFER_OBJECT_POOL_SIZE <int>","Set the hint size of vertex buffer object pool to manage."); 200 208 static ApplicationUsageProxy DisplaySetting_e20(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_FBO_POOL_SIZE <int>","Set the hint size of frame buffer object pool to manage."); 209 static ApplicationUsageProxy DisplaySetting_e21(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_GL_CONTEXT_VERSION <major.minor>","Set the hint for the GL version to create contexts for."); 210 static ApplicationUsageProxy DisplaySetting_e22(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_GL_CONTEXT_FLAGS <uint>","Set the hint for the GL context flags to use when creating contexts."); 211 static ApplicationUsageProxy DisplaySetting_e23(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_GL_CONTEXT_PROFILE_MASK <uint>","Set the hint for the GL context profile mask to use when creating contexts."); 201 212 202 213 void DisplaySettings::readEnvironmentalVariables() … … 404 415 { 405 416 _maxBufferObjectPoolSize = atoi(ptr); 417 } 418 419 if( (ptr = getenv("OSG_GL_VERSION")) != 0 || (ptr = getenv("OSG_GL_CONTEXT_VERSION")) != 0) 420 { 421 _glContextVersion = ptr; 422 } 423 424 if( (ptr = getenv("OSG_GL_CONTEXT_FLAGS")) != 0) 425 { 426 _glContextFlags = atoi(ptr); 427 } 428 429 if( (ptr = getenv("OSG_GL_CONTEXT_PROFILE_MASK")) != 0) 430 { 431 _glContextProfileMask = atoi(ptr); 406 432 } 407 433 } … … 424 450 arguments.getApplicationUsage()->addCommandLineOption("--cc","Request use of compile contexts and threads"); 425 451 arguments.getApplicationUsage()->addCommandLineOption("--serialize-draw <mode>","OFF | ON - set the serialization of draw dispatch"); 452 arguments.getApplicationUsage()->addCommandLineOption("--gl-version <major.minor>","Set the hint of which GL version to use when creating graphics contexts."); 453 arguments.getApplicationUsage()->addCommandLineOption("--gl-flags <mask>","Set the hint of which GL flags projfile mask to use when creating graphics contexts."); 454 arguments.getApplicationUsage()->addCommandLineOption("--gl-profile-mask <mask>","Set the hint of which GL context profile mask to use when creating graphics contexts."); 426 455 } 427 456 … … 495 524 while(arguments.read("--buffer-object-pool-size",_maxBufferObjectPoolSize)) {} 496 525 497 } 498 499 500 526 while (arguments.read("--gl-version", _glContextVersion)) {} 527 while (arguments.read("--gl-flags", _glContextFlags)) {} 528 while (arguments.read("--gl-profile-mask", _glContextProfileMask)) {} 529 530 } 531 532 533
