diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/llinventory/llsettingsbase.h | 2 | ||||
| -rw-r--r-- | indra/newview/llenvironment.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/llviewermenu.cpp | 13 | ||||
| -rw-r--r-- | indra/newview/llvosky.cpp | 43 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 15 | 
5 files changed, 55 insertions, 22 deletions
diff --git a/indra/llinventory/llsettingsbase.h b/indra/llinventory/llsettingsbase.h index 7f88227a6d..caae2dcd23 100644 --- a/indra/llinventory/llsettingsbase.h +++ b/indra/llinventory/llsettingsbase.h @@ -300,6 +300,7 @@ private:  class LLSettingsBlender : public PTR_NAMESPACE::enable_shared_from_this<LLSettingsBlender>  { +    LOG_CLASS(LLSettingsBlender);  public:      typedef PTR_NAMESPACE::shared_ptr<LLSettingsBlender>      ptr_t;      typedef boost::signals2::signal<void(const ptr_t )> finish_signal_t; @@ -380,6 +381,7 @@ protected:  class LLSettingsBlenderTimeDelta : public LLSettingsBlender  { +    LOG_CLASS(LLSettingsBlenderTimeDelta);  public:      LLSettingsBlenderTimeDelta(const LLSettingsBase::ptr_t &target,          const LLSettingsBase::ptr_t &initsetting, const LLSettingsBase::ptr_t &endsetting, const LLSettingsBase::Seconds& blend_span) : diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index 94605dc062..ee5eec59a3 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -66,6 +66,7 @@ namespace      LLTrace::BlockTimerStatHandle   FTM_SHADER_PARAM_UPDATE("Update Shader Parameters");      LLSettingsBase::Seconds         DEFAULT_UPDATE_THRESHOLD(10.0); +    const LLSettingsBase::Seconds   MINIMUM_SPANLENGTH(0.01f);      //---------------------------------------------------------------------      inline LLSettingsBase::TrackPosition get_wrapping_distance(LLSettingsBase::TrackPosition begin, LLSettingsBase::TrackPosition end) @@ -221,7 +222,8 @@ namespace          LLSettingsBase::Seconds getSpanTime(const LLSettingsDay::TrackBound_t &bounds) const          {              LLSettingsBase::Seconds span = mCycleLength * get_wrapping_distance((*bounds.first).first, (*bounds.second).first); -            llassert(span > 0.01f); +            if (span < MINIMUM_SPANLENGTH) // for very short spans set a minimum length. +                span = MINIMUM_SPANLENGTH;              return span;          } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index ce6cb78909..3688f6614f 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -8420,11 +8420,18 @@ class LLWorldEnvSettings : public view_listener_t              LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::KNOWN_SKY_MIDNIGHT);              LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);          } -		else +        else if (tod == "region")  		{              LLEnvironment::instance().clearEnvironment(LLEnvironment::ENV_LOCAL);              LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);          } +        else if (tod == "pauseclouds") +        { +            if (LLEnvironment::instance().isCloudScrollPaused()) +                LLEnvironment::instance().resumeCloudScroll(); +            else +                LLEnvironment::instance().pauseCloudScroll(); +        }          LLEnvironment::instance().updateEnvironment();  		return true; @@ -8467,6 +8474,10 @@ class LLWorldEnableEnvSettings : public view_listener_t  		{  			return false;  		} +        else if (tod == "pauseclouds") +        { +            return LLEnvironment::instance().isCloudScrollPaused(); +        }  		else  		{  			LL_WARNS() << "Unknown time-of-day item:  " << tod << LL_ENDL; diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 017ae9dd09..1a721c7370 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -59,27 +59,31 @@  #undef min  #undef max -static const S32 NUM_TILES_X = 8; -static const S32 NUM_TILES_Y = 4; -static const S32 NUM_TILES = NUM_TILES_X * NUM_TILES_Y; +namespace +{ +    const S32 NUM_TILES_X = 8; +    const S32 NUM_TILES_Y = 4; +    const S32 NUM_TILES = NUM_TILES_X * NUM_TILES_Y; -// Heavenly body constants -static const F32 SUN_DISK_RADIUS	= 0.5f; -static const F32 MOON_DISK_RADIUS	= SUN_DISK_RADIUS * 0.9f; -static const F32 SUN_INTENSITY = 1e5; +    // Heavenly body constants +    const F32 SUN_DISK_RADIUS	= 0.5f; +    const F32 MOON_DISK_RADIUS	= SUN_DISK_RADIUS * 0.9f; +    const F32 SUN_INTENSITY = 1e5; -// Texture coordinates: -static const LLVector2 TEX00 = LLVector2(0.f, 0.f); -static const LLVector2 TEX01 = LLVector2(0.f, 1.f); -static const LLVector2 TEX10 = LLVector2(1.f, 0.f); -static const LLVector2 TEX11 = LLVector2(1.f, 1.f); +    // Texture coordinates: +    const LLVector2 TEX00 = LLVector2(0.f, 0.f); +    const LLVector2 TEX01 = LLVector2(0.f, 1.f); +    const LLVector2 TEX10 = LLVector2(1.f, 0.f); +    const LLVector2 TEX11 = LLVector2(1.f, 1.f); -static const F32 LIGHT_DIRECTION_THRESHOLD = (F32) cosf(DEG_TO_RAD * 1.f); -static const F32 COLOR_CHANGE_THRESHOLD = 0.01f; +    const F32 LIGHT_DIRECTION_THRESHOLD = (F32) cosf(DEG_TO_RAD * 1.f); +    const F32 COLOR_CHANGE_THRESHOLD = 0.01f; -static LLTrace::BlockTimerStatHandle FTM_VOSKY_UPDATETIMER("VOSky Update Timer Tick"); -static LLTrace::BlockTimerStatHandle FTM_VOSKY_UPDATEFORCED("VOSky Update Forced"); +    LLTrace::BlockTimerStatHandle FTM_VOSKY_UPDATETIMER("VOSky Update Timer Tick"); +    LLTrace::BlockTimerStatHandle FTM_VOSKY_UPDATEFORCED("VOSky Update Forced"); +    F32Seconds UPDATE_EXPRY(2.0f); +}  /***************************************  		SkyTex  ***************************************/ @@ -590,6 +594,7 @@ void LLVOSky::idleUpdate(LLAgent &agent, const F64 &time)  bool LLVOSky::updateSky()  { +    LLTimer forceupdThrottle;      LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky();      LLColor4 total_ambient = psky->getTotalAmbient(); @@ -647,9 +652,11 @@ bool LLVOSky::updateSky()          mForceUpdate = mForceUpdate || color_changed;          mForceUpdate = mForceUpdate || !mInitialized; -		if (mForceUpdate && !gPipeline.canUseWindLightShaders()) +        if ((mForceUpdate) && (forceupdThrottle.hasExpired()) && (!gPipeline.canUseWindLightShaders()))  		{ -            LL_RECORD_BLOCK_TIME(FTM_VOSKY_UPDATEFORCED) +            LL_RECORD_BLOCK_TIME(FTM_VOSKY_UPDATEFORCED); + +            forceupdThrottle.setTimerExpirySec(UPDATE_EXPRY);  			LLSkyTex::stepCurrent();			 diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 3cac835961..d4881d3cba 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -639,10 +639,21 @@          <menu           create_jump_keys="true" -         label="Sun" -         name="Sun" +         label="Environment" +         name="Environment"           tear_off="true">              <menu_item_check +             label="Pause Clouds" +             name="pauseclouds"> +                <menu_item_check.on_click +                 function="World.EnvSettings" +                 parameter="pauseclouds" /> +                <menu_item_check.on_check +                 function="World.EnableEnvSettings"  +                 parameter="pauseclouds" /> +            </menu_item_check> +            <menu_item_separator/> +            <menu_item_check               label="Sunrise"               name="Sunrise">                  <menu_item_check.on_click  | 
