diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2013-06-28 15:26:18 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2013-06-28 15:26:18 -0400 |
commit | c08b60ac6fee74f613ed3f5f8702291ed1c2376f (patch) | |
tree | 9ee7649080868dbb73766e8cd89720f364fe08cb /indra/newview/llfeaturemanager.h | |
parent | 4a9b688b4d46f67e1b00e04ebe972470b61e560a (diff) |
CHOP-959: Streamline processing for --graphicslevel switch.
Use map-to in cmd_line.xml to inform the command-line processor that the
target variable for --graphicslevel is RenderQualityPerformance.
That lets us eliminate clunky llappviewer.cpp switch from '0' to 0, etc.
Moreover, previous switch statement only accepted 0 - 3, whereas
LLFeatureManager::setGraphicsLevel() actually accepts 0 - 6. Introduce
LLFeatureManager::isValidGraphicsLevel() and use that to validate.
Replace switch statement in setGraphicsLevel() mapping int constants to string
literals with static vector of level names, using same data for mapping as for
validating level numbers.
Diffstat (limited to 'indra/newview/llfeaturemanager.h')
-rwxr-xr-x | indra/newview/llfeaturemanager.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/newview/llfeaturemanager.h b/indra/newview/llfeaturemanager.h index ad72c16743..3b8d251236 100755 --- a/indra/newview/llfeaturemanager.h +++ b/indra/newview/llfeaturemanager.h @@ -134,8 +134,18 @@ public: // skipFeatures forces skipping of mostly hardware settings // that we don't want to change when we change graphics // settings - void setGraphicsLevel(S32 level, bool skipFeatures); - + void setGraphicsLevel(U32 level, bool skipFeatures); + + // What 'level' values are valid to pass to setGraphicsLevel()? + // 0 is the low end... + U32 getMaxGraphicsLevel() const; + bool isValidGraphicsLevel(U32 level) const; + + // setGraphicsLevel() levels have names. + std::string getNameForGraphicsLevel(U32 level) const; + // returns -1 for unrecognized name (hence S32 rather than U32) + S32 getGraphicsLevelForName(const std::string& name) const; + void applyBaseMasks(); void applyRecommendedSettings(); |