added code for disabling clouds

This commit is contained in:
Hazim Gazov
2010-04-18 22:46:40 -03:00
parent faf628668b
commit 1d67001d25
6 changed files with 1704 additions and 1675 deletions

View File

@@ -254,10 +254,6 @@ PFNGLBINDATTRIBLOCATIONARBPROC glBindAttribLocationARB = NULL;
PFNGLGETACTIVEATTRIBARBPROC glGetActiveAttribARB = NULL;
PFNGLGETATTRIBLOCATIONARBPROC glGetAttribLocationARB = NULL;
#if LL_WINDOWS
PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = NULL;
#endif
#if LL_LINUX_NV_GL_HEADERS
// linux nvidia headers. these define these differently to mesa's. ugh.
PFNGLACTIVETEXTUREARBPROC glActiveTextureARB = NULL;

File diff suppressed because it is too large Load Diff

View File

@@ -12703,5 +12703,16 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>CloudsEnabled</key>
<map>
<key>Comment</key>
<string>Render Clouds</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
</map>
</llsd>

View File

@@ -39,6 +39,7 @@
#include "lluictrlfactory.h"
#include "llcombobox.h"
#include "llwind.h"
#include "pipeline.h"
class LLPrefsInertImpl : public LLPanel
{
@@ -65,6 +66,8 @@ private:
BOOL mSpeedRez;
BOOL mRevokePermsOnStandUp;
BOOL mEnableLLWind;
BOOL mEnableClouds;
BOOL mInitialEnableClouds;
U32 mSpeedRezInterval;
U32 mLinksForChattingObjects;
U32 mTimeFormat;
@@ -78,6 +81,8 @@ LLPrefsInertImpl::LLPrefsInertImpl()
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_inert.xml");
childSetCommitCallback("speed_rez_check", onCommitCheckBox, this);
refresh();
mInitialEnableClouds = mEnableClouds;
}
//static
@@ -114,6 +119,7 @@ void LLPrefsInertImpl::refreshValues()
mLinksForChattingObjects = gSavedSettings.getU32("LinksForChattingObjects");
mRevokePermsOnStandUp = gSavedSettings.getBOOL("RevokePermsOnStandUp");
mEnableLLWind = gSavedSettings.getBOOL("WindEnabled");
mEnableClouds = gSavedSettings.getBOOL("CloudsEnabled");
}
void LLPrefsInertImpl::refresh()
@@ -188,6 +194,12 @@ void LLPrefsInertImpl::cancel()
gSavedSettings.setBOOL("RevokePermsOnStandUp", mRevokePermsOnStandUp);
gSavedSettings.setBOOL("WindEnabled", mEnableLLWind);
gLLWindEnabled = mEnableLLWind;
if(mInitialEnableClouds != gSavedSettings.getBOOL("CloudsEnabled"))
{
gSavedSettings.setBOOL("CloudsEnabled", mEnableClouds);
LLPipeline::toggleRenderTypeControl((void*)LLPipeline::RENDER_TYPE_CLOUDS);
}
}
void LLPrefsInertImpl::apply()

View File

@@ -2569,6 +2569,11 @@ bool idle_startup()
{
LLFloaterBeacons::showInstance();
}
if (!gSavedSettings.getBOOL("CloudsEnabled") && !gNoRender)
{
LLPipeline::toggleRenderTypeControl((void*)LLPipeline::RENDER_TYPE_CLOUDS);
}
if (!gNoRender)
{

View File

@@ -90,6 +90,11 @@
label="Enable Wind Effects" left="10"
mouse_opaque="true" name="enable_wind" radio_style="false"
width="400" />
<check_box bottom_delta="-20" control_name="CloudsEnabled" enabled="true"
follows="left|top" font="SansSerifSmall" height="16" initial_value="true"
label="Enable Clouds" left="10"
mouse_opaque="true" name="enable_clouds" radio_style="false"
width="400" />
</panel>
<panel border="true" left="1" bottom="-408" height="408" width="500" mouse_opaque="true"
follows="left|top|right|bottom" label="Miscellaneous" name="Miscellaneous">