From 9f8ab415561badbe35f78d643f1738be9bdd0db4 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 2 Apr 2009 08:44:08 +0000 Subject: [PATCH] Added OSG_MULTI_SAMPLES env var for setting the default DisplaySettings NumMultiSamples value --- src/osg/DisplaySettings.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/osg/DisplaySettings.cpp b/src/osg/DisplaySettings.cpp index 43a3b7f55..fc6d2bda2 100644 --- a/src/osg/DisplaySettings.cpp +++ b/src/osg/DisplaySettings.cpp @@ -184,6 +184,7 @@ static ApplicationUsageProxy DisplaySetting_e13(ApplicationUsage::ENVIRONMENTAL_ 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."); void DisplaySettings::readEnvironmentalVariables() { @@ -375,6 +376,11 @@ void DisplaySettings::readEnvironmentalVariables() { _numHttpDatabaseThreadsHint = atoi(ptr); } + + if( (ptr = getenv("OSG_MULTI_SAMPLES")) != 0) + { + _numMultiSamples = atoi(ptr); + } } void DisplaySettings::readCommandLine(ArgumentParser& arguments)