From dd8f936ba8e18171770e9971675a2433d25751f1 Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Wed, 7 Feb 2024 11:09:27 -0600 Subject: #665 Make viewer respect MaxTextureResolution from SimulatorFeatures --- indra/newview/llviewerregion.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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. -- cgit v1.2.3