diff options
author | Ptolemy <ptolemy@lindenlab.com> | 2021-10-22 15:15:07 -0700 |
---|---|---|
committer | Ptolemy <ptolemy@lindenlab.com> | 2021-10-22 15:15:07 -0700 |
commit | 2c2f6f2a9b867552460a9c2e52b9d9dab0b73b14 (patch) | |
tree | e682c2a2f74325bc58a95b320e65a92a8959223e /indra/newview/llenvironment.h | |
parent | 26e8d2d8c7328878cb6bc83eb6b3b7b5b1462f17 (diff) | |
parent | 3efd4c50a031ce0c1cb3d2fcc43e403136277e1f (diff) |
Merge branch 'DRTVWR-546' into SL-16127
Diffstat (limited to 'indra/newview/llenvironment.h')
-rw-r--r-- | indra/newview/llenvironment.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 7cbf2d25bb..3568fbcfd1 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -38,11 +38,12 @@ #include "llatmosphere.h" +#include "llglslshader.h" + #include <boost/signals2.hpp> //------------------------------------------------------------------------- class LLViewerCamera; -class LLGLSLShader; class LLParcel; //------------------------------------------------------------------------- @@ -50,8 +51,8 @@ class LLEnvironment : public LLSingleton<LLEnvironment> { LLSINGLETON_C11(LLEnvironment); LOG_CLASS(LLEnvironment); - public: + static const F64Seconds TRANSITION_INSTANT; static const F64Seconds TRANSITION_FAST; static const F64Seconds TRANSITION_DEFAULT; @@ -131,9 +132,14 @@ public: void update(const LLViewerCamera * cam); - static void updateGLVariablesForSettings(LLGLSLShader *shader, const LLSettingsBase::ptr_t &psetting); + static void updateGLVariablesForSettings(LLShaderUniforms* uniforms, const LLSettingsBase::ptr_t &psetting); + + // apply current sky settings to given shader void updateShaderUniforms(LLGLSLShader *shader); + // prepare settings to be applied to shaders (call whenever settings are updated) + void updateSettingsUniforms(); + void setSelectedEnvironment(EnvSelection_t env, LLSettingsBase::Seconds transition = TRANSITION_DEFAULT, bool forced = false); EnvSelection_t getSelectedEnvironment() const { return mSelectedEnvironment; } @@ -234,6 +240,11 @@ public: void handleEnvironmentPush(LLSD &message); + //cached uniform values from LLSD values + LLShaderUniforms mWaterUniforms[LLGLSLShader::SG_COUNT]; + LLShaderUniforms mSkyUniforms[LLGLSLShader::SG_COUNT]; + // ======================================================================================= + class DayInstance: public std::enable_shared_from_this<DayInstance> { public: @@ -288,6 +299,7 @@ public: LLSettingsDay::ptr_t mDayCycle; LLSettingsSky::ptr_t mSky; LLSettingsWater::ptr_t mWater; + S32 mSkyTrack; bool mInitialized; |