summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.cpp
diff options
context:
space:
mode:
authorcosmic-linden <111533034+cosmic-linden@users.noreply.github.com>2024-02-07 09:15:05 -0800
committerGitHub <noreply@github.com>2024-02-07 09:15:05 -0800
commite38a64601862feaff7089f3826de78b591ba4b96 (patch)
treee96295764454b0beab5480e02efd8c5560b9a988 /indra/newview/llviewerregion.cpp
parentf0570e4edba91c2ebe66bea545d188b1df50973a (diff)
parentdd8f936ba8e18171770e9971675a2433d25751f1 (diff)
Merge pull request #751 from secondlife/davep/655
#665 Make viewer respect MaxTextureResolution from SimulatorFeatures
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rwxr-xr-xindra/newview/llviewerregion.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index d541bb6647..ce57585d82 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -2438,7 +2438,19 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features)
mSimulatorFeatures = sim_features;
setSimulatorFeaturesReceived(true);
-
+
+ // if region has MaxTextureResolution, set max_texture_dimension settings, otherwise use default
+ if (mSimulatorFeatures.has("MaxTextureResolution"))
+ {
+ S32 max_texture_resolution = mSimulatorFeatures["MaxTextureResolution"].asInteger();
+ gSavedSettings.setS32("max_texture_dimension_X", max_texture_resolution);
+ gSavedSettings.setS32("max_texture_dimension_Y", max_texture_resolution);
+ }
+ else
+ {
+ gSavedSettings.setS32("max_texture_dimension_X", 1024);
+ gSavedSettings.setS32("max_texture_dimension_Y", 1024);
+ }
}
//this is called when the parent is not cacheable.