diff options
author | Dave Parks <davep@lindenlab.com> | 2022-04-11 15:52:11 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-04-11 15:52:11 -0500 |
commit | cb6e1ac4a8a9c459202e1fcc27c1067c61d2ce26 (patch) | |
tree | 9ce090ed143f1793b334e406973c210b1a310941 /indra/newview | |
parent | 1d057dbba2d5f9c51a533405fea408bff5ff84df (diff) | |
parent | d248961c306511f633cefedbec5269c7a81e5bc9 (diff) |
Merge branch 'DRTVWR-546' of ssh://bitbucket.org/lindenlab/viewer into DRTVWR-546
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llenvironment.cpp | 22 | ||||
-rw-r--r-- | indra/newview/llenvironment.h | 2 | ||||
-rw-r--r-- | indra/newview/llfloaterfixedenvironment.cpp | 1 |
3 files changed, 23 insertions, 2 deletions
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index 42f3d15a1c..b76dc6a961 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -1155,6 +1155,10 @@ void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, const LLSe mSignalEnvChanged(env, env_version); } +void LLEnvironment::setCurrentEnvironmentSelection(LLEnvironment::EnvSelection_t env) +{ + mCurrentEnvironment->setEnvironmentSelection(env); +} void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, LLEnvironment::fixedEnvironment_t fixed, S32 env_version) { @@ -1761,8 +1765,22 @@ void LLEnvironment::updateShaderUniforms(LLGLSLShader* shader) void LLEnvironment::updateSettingsUniforms() { - updateGLVariablesForSettings(mWaterUniforms, mCurrentEnvironment->getWater()); - updateGLVariablesForSettings(mSkyUniforms, mCurrentEnvironment->getSky()); + if (mCurrentEnvironment->getWater()) + { + updateGLVariablesForSettings(mWaterUniforms, mCurrentEnvironment->getWater()); + } + else + { + LL_WARNS("ENVIRONMENT") << "Failed to update GL variable for water settings, environment is not properly set" << LL_ENDL; + } + if (mCurrentEnvironment->getSky()) + { + updateGLVariablesForSettings(mSkyUniforms, mCurrentEnvironment->getSky()); + } + else + { + LL_WARNS("ENVIRONMENT") << "Failed to update GL variable for sky settings, environment is not properly set" << LL_ENDL; + } } void LLEnvironment::recordEnvironment(S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envinfo, LLSettingsBase::Seconds transition) diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 0ec06402f8..330de2bea8 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -158,6 +158,8 @@ public: static void logEnvironment(EnvSelection_t env, const LLSettingsBase::ptr_t &settings, S32 env_version = NO_VERSION); + void setCurrentEnvironmentSelection(LLEnvironment::EnvSelection_t env); + LLSettingsDay::ptr_t getEnvironmentDay(EnvSelection_t env); LLSettingsDay::Seconds getEnvironmentDayLength(EnvSelection_t env); diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp index 4f2c36f45b..fec218ca3b 100644 --- a/indra/newview/llfloaterfixedenvironment.cpp +++ b/indra/newview/llfloaterfixedenvironment.cpp @@ -137,6 +137,7 @@ void LLFloaterFixedEnvironment::onClose(bool app_quitting) doCloseInventoryFloater(app_quitting); LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL); + LLEnvironment::instance().setCurrentEnvironmentSelection(LLEnvironment::ENV_LOCAL); LLEnvironment::instance().clearEnvironment(LLEnvironment::ENV_EDIT); mSettings.reset(); |