From fbbc8824cf4b9b93da33fc67eb36dfab93c14040 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 1 Oct 2010 15:58:49 +0000 Subject: [PATCH] From Magnes Kessler, "Attached are some fixes for the environment variable help strings in DisplaySettings. They contain spelling fixes and an attempt to use consistent expressions throughout." --- src/osg/DisplaySettings.cpp | 104 +++++++++++++++++++++++++++--------- 1 file changed, 78 insertions(+), 26 deletions(-) diff --git a/src/osg/DisplaySettings.cpp b/src/osg/DisplaySettings.cpp index 155502cf4..40ae21134 100644 --- a/src/osg/DisplaySettings.cpp +++ b/src/osg/DisplaySettings.cpp @@ -201,32 +201,84 @@ void DisplaySettings::setMinimumNumAccumBits(unsigned int red, unsigned int gree _minimumNumberAccumAlphaBits = alpha; } -static ApplicationUsageProxy DisplaySetting_e0(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_DISPLAY_TYPE ","MONITOR | POWERWALL | REALITY_CENTER | HEAD_MOUNTED_DISPLAY"); -static ApplicationUsageProxy DisplaySetting_e1(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_STEREO_MODE ","QUAD_BUFFER | ANAGLYPHIC | HORIZONTAL_SPLIT | VERTICAL_SPLIT | LEFT_EYE | RIGHT_EYE | VERTICAL_INTERLACE | HORIZONTAL_INTERLACE"); -static ApplicationUsageProxy DisplaySetting_e2(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_STEREO ","OFF | ON"); -static ApplicationUsageProxy DisplaySetting_e3(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_EYE_SEPARATION ","physical distance between eyes"); -static ApplicationUsageProxy DisplaySetting_e4(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_SCREEN_DISTANCE ","physical distance between eyes and screen"); -static ApplicationUsageProxy DisplaySetting_e5(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_SCREEN_HEIGHT ","physical screen height"); -static ApplicationUsageProxy DisplaySetting_e6(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_SCREEN_WIDTH ","physical screen width"); -static ApplicationUsageProxy DisplaySetting_e7(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_SPLIT_STEREO_HORIZONTAL_EYE_MAPPING ","LEFT_EYE_LEFT_VIEWPORT | LEFT_EYE_RIGHT_VIEWPORT"); -static ApplicationUsageProxy DisplaySetting_e8(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_SPLIT_STEREO_HORIZONTAL_SEPARATION ","number of pixels between viewports"); -static ApplicationUsageProxy DisplaySetting_e9(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_SPLIT_STEREO_VERTICAL_EYE_MAPPING ","LEFT_EYE_TOP_VIEWPORT | LEFT_EYE_BOTTOM_VIEWPORT"); -static ApplicationUsageProxy DisplaySetting_e10(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_SPLIT_STEREO_AUTO_ADJUST_ASPECT_RATIO ","OFF | ON Default to ON to compenstate for the compression of the aspect ratio when viewing in split screen stereo. Note, if you are setting fovx and fovy explicityly OFF should be used."); -static ApplicationUsageProxy DisplaySetting_e11(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_SPLIT_STEREO_VERTICAL_SEPARATION ","number of pixels between viewports"); -static ApplicationUsageProxy DisplaySetting_e12(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_MAX_NUMBER_OF_GRAPHICS_CONTEXTS ","maximum number of graphics contexts to be used with applications."); -static ApplicationUsageProxy DisplaySetting_e13(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_COMPILE_CONTEXTS ","OFF | ON Enable/disable the use a backgrouind compile contexts and threads."); -static ApplicationUsageProxy DisplaySetting_e14(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_SERIALIZE_DRAW_DISPATCH ","OFF | ON Enable/disable the use a muetx to serialize the draw dispatch when there are multiple graphics threads."); -static ApplicationUsageProxy DisplaySetting_e15(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_NUM_DATABASE_THREADS ","Set the hint for the total number of threads to set up in the DatabasePager."); -static ApplicationUsageProxy DisplaySetting_e16(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_NUM_HTTP_DATABASE_THREADS ","Set the hint for the total number of threads dedicated to http requests to set up in the DatabasePager."); -static ApplicationUsageProxy DisplaySetting_e17(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_MULTI_SAMPLES ","Set the hint for the number of samples to use when multi-sampling."); -static ApplicationUsageProxy DisplaySetting_e18(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_TEXTURE_POOL_SIZE ","Set the hint size of texture pool to manage."); -static ApplicationUsageProxy DisplaySetting_e19(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_BUFFER_OBJECT_POOL_SIZE ","Set the hint size of vertex buffer object pool to manage."); -static ApplicationUsageProxy DisplaySetting_e20(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_FBO_POOL_SIZE ","Set the hint size of frame buffer object pool to manage."); -static ApplicationUsageProxy DisplaySetting_e21(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_IMPLICIT_BUFFER_ATTACHMENT_RENDER_MASK","OFF | DEFAULT | [~]COLOR | [~]DEPTH | [~]STENCIL. Substitute missing buffer attachments for render FBO"); -static ApplicationUsageProxy DisplaySetting_e22(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_IMPLICIT_BUFFER_ATTACHMENT_RESOLVE_MASK","OFF | DEFAULT | [~]COLOR | [~]DEPTH | [~]STENCIL. Substitute missing buffer attachments for resolve FBO"); -static ApplicationUsageProxy DisplaySetting_e23(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_GL_CONTEXT_VERSION ","Set the hint for the GL version to create contexts for."); -static ApplicationUsageProxy DisplaySetting_e24(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_GL_CONTEXT_FLAGS ","Set the hint for the GL context flags to use when creating contexts."); -static ApplicationUsageProxy DisplaySetting_e25(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_GL_CONTEXT_PROFILE_MASK ","Set the hint for the GL context profile mask to use when creating contexts."); +static ApplicationUsageProxy DisplaySetting_e0(ApplicationUsage::ENVIRONMENTAL_VARIABLE, + "OSG_DISPLAY_TYPE ", + "MONITOR | POWERWALL | REALITY_CENTER | HEAD_MOUNTED_DISPLAY"); +static ApplicationUsageProxy DisplaySetting_e1(ApplicationUsage::ENVIRONMENTAL_VARIABLE, + "OSG_STEREO_MODE ", + "QUAD_BUFFER | ANAGLYPHIC | HORIZONTAL_SPLIT | VERTICAL_SPLIT | LEFT_EYE | RIGHT_EYE | VERTICAL_INTERLACE | HORIZONTAL_INTERLACE"); +static ApplicationUsageProxy DisplaySetting_e2(ApplicationUsage::ENVIRONMENTAL_VARIABLE, + "OSG_STEREO ", + "OFF | ON"); +static ApplicationUsageProxy DisplaySetting_e3(ApplicationUsage::ENVIRONMENTAL_VARIABLE, + "OSG_EYE_SEPARATION ", + "Physical distance between eyes."); +static ApplicationUsageProxy DisplaySetting_e4(ApplicationUsage::ENVIRONMENTAL_VARIABLE, + "OSG_SCREEN_DISTANCE ", + "Physical distance between eyes and screen."); +static ApplicationUsageProxy DisplaySetting_e5(ApplicationUsage::ENVIRONMENTAL_VARIABLE, + "OSG_SCREEN_HEIGHT ", + "Physical screen height."); +static ApplicationUsageProxy DisplaySetting_e6(ApplicationUsage::ENVIRONMENTAL_VARIABLE, + "OSG_SCREEN_WIDTH ", + "Physical screen width."); +static ApplicationUsageProxy DisplaySetting_e7(ApplicationUsage::ENVIRONMENTAL_VARIABLE, + "OSG_SPLIT_STEREO_HORIZONTAL_EYE_MAPPING ", + "LEFT_EYE_LEFT_VIEWPORT | LEFT_EYE_RIGHT_VIEWPORT"); +static ApplicationUsageProxy DisplaySetting_e8(ApplicationUsage::ENVIRONMENTAL_VARIABLE, + "OSG_SPLIT_STEREO_HORIZONTAL_SEPARATION ", + "Number of pixels between viewports."); +static ApplicationUsageProxy DisplaySetting_e9(ApplicationUsage::ENVIRONMENTAL_VARIABLE, + "OSG_SPLIT_STEREO_VERTICAL_EYE_MAPPING ", + "LEFT_EYE_TOP_VIEWPORT | LEFT_EYE_BOTTOM_VIEWPORT"); +static ApplicationUsageProxy DisplaySetting_e10(ApplicationUsage::ENVIRONMENTAL_VARIABLE, + "OSG_SPLIT_STEREO_AUTO_ADJUST_ASPECT_RATIO ", + "OFF | ON Default to ON to compenstate for the compression of the aspect ratio when viewing in split screen stereo. Note, if you are setting fovx and fovy explicityly OFF should be used."); +static ApplicationUsageProxy DisplaySetting_e11(ApplicationUsage::ENVIRONMENTAL_VARIABLE, + "OSG_SPLIT_STEREO_VERTICAL_SEPARATION ", + "Number of pixels between viewports."); +static ApplicationUsageProxy DisplaySetting_e12(ApplicationUsage::ENVIRONMENTAL_VARIABLE, + "OSG_MAX_NUMBER_OF_GRAPHICS_CONTEXTS ", + "Maximum number of graphics contexts to be used with applications."); +static ApplicationUsageProxy DisplaySetting_e13(ApplicationUsage::ENVIRONMENTAL_VARIABLE, + "OSG_COMPILE_CONTEXTS ", + "OFF | ON Disable/enable the use of background compiled contexts and threads."); +static ApplicationUsageProxy DisplaySetting_e14(ApplicationUsage::ENVIRONMENTAL_VARIABLE, + "OSG_SERIALIZE_DRAW_DISPATCH ", + "OFF | ON Disable/enable the use of a mutex to serialize the draw dispatch when there are multiple graphics threads."); +static ApplicationUsageProxy DisplaySetting_e15(ApplicationUsage::ENVIRONMENTAL_VARIABLE, + "OSG_NUM_DATABASE_THREADS ", + "Set the hint for the total number of threads to set up in the DatabasePager."); +static ApplicationUsageProxy DisplaySetting_e16(ApplicationUsage::ENVIRONMENTAL_VARIABLE, + "OSG_NUM_HTTP_DATABASE_THREADS ", + "Set the hint for the total number of threads dedicated to http requests to set up in the DatabasePager."); +static ApplicationUsageProxy DisplaySetting_e17(ApplicationUsage::ENVIRONMENTAL_VARIABLE, + "OSG_MULTI_SAMPLES ", + "Set the hint for the number of samples to use when multi-sampling."); +static ApplicationUsageProxy DisplaySetting_e18(ApplicationUsage::ENVIRONMENTAL_VARIABLE, + "OSG_TEXTURE_POOL_SIZE ", + "Set the hint for the size of the texture pool to manage."); +static ApplicationUsageProxy DisplaySetting_e19(ApplicationUsage::ENVIRONMENTAL_VARIABLE, + "OSG_BUFFER_OBJECT_POOL_SIZE ", + "Set the hint for the size of the vertex buffer object pool to manage."); +static ApplicationUsageProxy DisplaySetting_e20(ApplicationUsage::ENVIRONMENTAL_VARIABLE, + "OSG_FBO_POOL_SIZE ", + "Set the hint for the size of the frame buffer object pool to manage."); +static ApplicationUsageProxy DisplaySetting_e21(ApplicationUsage::ENVIRONMENTAL_VARIABLE, + "OSG_IMPLICIT_BUFFER_ATTACHMENT_RENDER_MASK", + "OFF | DEFAULT | [~]COLOR | [~]DEPTH | [~]STENCIL. Substitute missing buffer attachments for render FBO."); +static ApplicationUsageProxy DisplaySetting_e22(ApplicationUsage::ENVIRONMENTAL_VARIABLE, + "OSG_IMPLICIT_BUFFER_ATTACHMENT_RESOLVE_MASK", + "OFF | DEFAULT | [~]COLOR | [~]DEPTH | [~]STENCIL. Substitute missing buffer attachments for resolve FBO."); +static ApplicationUsageProxy DisplaySetting_e23(ApplicationUsage::ENVIRONMENTAL_VARIABLE, + "OSG_GL_CONTEXT_VERSION ", + "Set the hint for the GL version to create contexts for."); +static ApplicationUsageProxy DisplaySetting_e24(ApplicationUsage::ENVIRONMENTAL_VARIABLE, + "OSG_GL_CONTEXT_FLAGS ", + "Set the hint for the GL context flags to use when creating contexts."); +static ApplicationUsageProxy DisplaySetting_e25(ApplicationUsage::ENVIRONMENTAL_VARIABLE, + "OSG_GL_CONTEXT_PROFILE_MASK ", + "Set the hint for the GL context profile mask to use when creating contexts."); void DisplaySettings::readEnvironmentalVariables() {