summaryrefslogtreecommitdiff
path: root/indra/newview/llenvironment.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llenvironment.h')
-rw-r--r--indra/newview/llenvironment.h18
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;