diff options
author | RunitaiLinden <davep@lindenlab.com> | 2024-02-07 11:09:27 -0600 |
---|---|---|
committer | RunitaiLinden <davep@lindenlab.com> | 2024-02-07 11:09:27 -0600 |
commit | dd8f936ba8e18171770e9971675a2433d25751f1 (patch) | |
tree | 61a7deaf8b376b70f63d6901d74e8525f19a1544 | |
parent | 85bf567010d54b64b3144397bff7c3c0448d85da (diff) |
#665 Make viewer respect MaxTextureResolution from SimulatorFeatures
-rwxr-xr-x | indra/newview/llviewerregion.cpp | 14 |
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. |