summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.cpp
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2024-02-07 11:09:27 -0600
committerRunitaiLinden <davep@lindenlab.com>2024-02-07 11:09:27 -0600
commitdd8f936ba8e18171770e9971675a2433d25751f1 (patch)
tree61a7deaf8b376b70f63d6901d74e8525f19a1544 /indra/newview/llviewerregion.cpp
parent85bf567010d54b64b3144397bff7c3c0448d85da (diff)
#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 dae476d9d7..53dd3af9ef 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -2407,7 +2407,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.