summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorGraham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com>2018-03-02 23:29:28 +0000
committerGraham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com>2018-03-02 23:29:28 +0000
commitacdead96cd194040f586c5a6e976beca7bb999c4 (patch)
treec61662fe5f0a91f4c9dc291251625410036c2e19 /indra
parent7951001081209855178b73a0092cc18b1a192397 (diff)
Replace ifdefs with comments marking legacy atmo params.
Diffstat (limited to 'indra')
-rw-r--r--indra/llinventory/llsettingssky.cpp14
-rw-r--r--indra/llinventory/llsettingssky.h5
-rw-r--r--indra/newview/llenvadapters.cpp3
-rw-r--r--indra/newview/llenvadapters.h3
-rw-r--r--indra/newview/llfloatereditsky.cpp6
-rw-r--r--indra/newview/llsettingsvo.cpp6
-rw-r--r--indra/newview/llvosky.cpp14
-rw-r--r--indra/newview/llvosky.h3
8 files changed, 16 insertions, 38 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index 30de842e2e..b8a45a8d89 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -351,7 +351,7 @@ LLSettingsSky::validation_list_t LLSettingsSky::validationList()
// a parameter without first wrapping it in a pure LLSD object will result
// in deeply nested arrays like this [[[[[[[[[[v1,v2,v3]]]]]]]]]]
-#if SUPPORT_LEGACY_ATMOSPHERICS
+// LEGACY_ATMOSPHERICS
validation.push_back(Validator(SETTING_AMBIENT, true, LLSD::TypeArray,
boost::bind(&Validator::verifyVectorMinMax, _1,
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)("*")),
@@ -373,8 +373,6 @@ LLSettingsSky::validation_list_t LLSettingsSky::validationList()
validation.push_back(Validator(SETTING_HAZE_HORIZON, true, LLSD::TypeReal,
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
-#endif
-
validation.push_back(Validator(SETTING_BLOOM_TEXTUREID, true, LLSD::TypeUUID));
validation.push_back(Validator(SETTING_CLOUD_COLOR, true, LLSD::TypeArray,
boost::bind(&Validator::verifyVectorMinMax, _1,
@@ -497,7 +495,7 @@ LLSD LLSettingsSky::defaults()
LLQuaternion moonquat = ~sunquat;
// Magic constants copied form dfltsetting.xml
-#if SUPPORT_LEGACY_ATMOSPHERICS
+// LEGACY_ATMOSPHERICS
dfltsetting[SETTING_AMBIENT] = LLColor4::white.getValue();
dfltsetting[SETTING_BLUE_DENSITY] = LLColor4(0.2447, 0.4487, 0.7599, 0.0).getValue();
dfltsetting[SETTING_BLUE_HORIZON] = LLColor4(0.4954, 0.4954, 0.6399, 0.0).getValue();
@@ -505,7 +503,6 @@ LLSD LLSettingsSky::defaults()
dfltsetting[SETTING_DISTANCE_MULTIPLIER] = LLSD::Real(0.8000);
dfltsetting[SETTING_HAZE_DENSITY] = LLSD::Real(0.6999);
dfltsetting[SETTING_HAZE_HORIZON] = LLSD::Real(0.1899);
-#endif
dfltsetting[SETTING_CLOUD_COLOR] = LLColor4(0.4099, 0.4099, 0.4099, 0.0).getValue();
dfltsetting[SETTING_CLOUD_POS_DENSITY1] = LLColor4(1.0000, 0.5260, 1.0000, 0.0).getValue();
@@ -554,7 +551,7 @@ LLSD LLSettingsSky::translateLegacySettings(LLSD legacy)
// AdvancedAtmospherics TODO
// These need to be translated into density profile info in the new settings format...
-#if SUPPORT_LEGACY_ATMOSPHERICS
+// LEGACY_ATMOSPHERICS
if (legacy.has(SETTING_AMBIENT))
{
newsettings[SETTING_AMBIENT] = LLColor3(legacy[SETTING_AMBIENT]).getValue();
@@ -583,7 +580,6 @@ LLSD LLSettingsSky::translateLegacySettings(LLSD legacy)
{
newsettings[SETTING_HAZE_HORIZON] = LLSD::Real(legacy[SETTING_HAZE_HORIZON][0].asReal());
}
-#endif
if (!legacy.has(SETTING_RAYLEIGH_CONFIG))
{
@@ -770,7 +766,7 @@ void LLSettingsSky::calculateHeavnlyBodyPositions()
void LLSettingsSky::calculateLightSettings()
{
-#if SUPPORT_LEGACY_ATMOSPHERICS
+// LEGACY_ATMOSPHERICS
LLColor3 vary_HazeColor;
LLColor3 vary_SunlightColor;
LLColor3 vary_AmbientColor;
@@ -859,8 +855,6 @@ void LLSettingsSky::calculateLightSettings()
mFadeColor = mTotalAmbient + (mSunDiffuse + mMoonDiffuse) * 0.5f;
mFadeColor.setAlpha(0);
-#endif
-
}
diff --git a/indra/llinventory/llsettingssky.h b/indra/llinventory/llsettingssky.h
index dec9467e8d..4884f4f094 100644
--- a/indra/llinventory/llsettingssky.h
+++ b/indra/llinventory/llsettingssky.h
@@ -31,8 +31,6 @@
#include "llsettingsbase.h"
#include "v4coloru.h"
-#define SUPPORT_LEGACY_ATMOSPHERICS 1
-
class LLSettingsSky: public LLSettingsBase
{
public:
@@ -106,7 +104,7 @@ public:
}
//---------------------------------------------------------------------
-#if SUPPORT_LEGACY_ATMOSPHERICS
+// LEGACY_ATMOSPHERICS
LLColor3 getAmbientColor() const
{
return LLColor3(mSettings[SETTING_AMBIENT]);
@@ -176,7 +174,6 @@ public:
{
setValue(SETTING_HAZE_HORIZON, val);
}
-#endif
LLColor3 getCloudColor() const
{
diff --git a/indra/newview/llenvadapters.cpp b/indra/newview/llenvadapters.cpp
index 85da9e853d..57c7a75d52 100644
--- a/indra/newview/llenvadapters.cpp
+++ b/indra/newview/llenvadapters.cpp
@@ -34,7 +34,7 @@
LLSkySettingsAdapter::LLSkySettingsAdapter():
mWLGamma(1.0f, LLSettingsSky::SETTING_GAMMA),
-#if SUPPORT_LEGACY_ATMOSPHERICS
+// LEGACY_ATMOSPHERICS
mAmbient(LLColor4(0.5f, 0.75f, 1.0f, 1.19f), LLSettingsSky::SETTING_AMBIENT, "WLAmbient"),
mBlueHorizon(LLColor4(0.25f, 0.25f, 1.0f, 1.0f), LLSettingsSky::SETTING_BLUE_HORIZON, "WLBlueHorizon"),
mBlueDensity(LLColor4(0.25f, 0.25f, 0.25f, 1.0f), LLSettingsSky::SETTING_BLUE_DENSITY, "WLBlueDensity"),
@@ -43,7 +43,6 @@ LLSkySettingsAdapter::LLSkySettingsAdapter():
mDensityMult(1.0f, LLSettingsSky::SETTING_DENSITY_MULTIPLIER, 1000),
mDistanceMult(1.0f, LLSettingsSky::SETTING_DISTANCE_MULTIPLIER),
mMaxAlt(4000.0f, LLSettingsSky::SETTING_MAX_Y),
-#endif
// Lighting
mLightnorm(LLColor4(0.f, 0.707f, -0.707f, 1.f), LLSettingsSky::SETTING_LIGHT_NORMAL),
diff --git a/indra/newview/llenvadapters.h b/indra/newview/llenvadapters.h
index c48311863e..1547e38b1d 100644
--- a/indra/newview/llenvadapters.h
+++ b/indra/newview/llenvadapters.h
@@ -365,7 +365,7 @@ public:
WLFloatControl mWLGamma;
/// Atmospherics
-#if SUPPORT_LEGACY_ATMOSPHERICS
+// LEGACY_ATMOSPHERICS
WLColorControl mAmbient;
WLColorControl mBlueHorizon;
WLFloatControl mHazeDensity;
@@ -374,7 +374,6 @@ public:
WLFloatControl mDistanceMult;
WLFloatControl mHazeHorizon;
WLFloatControl mMaxAlt;
-#endif
/// Lighting
WLColorControl mLightnorm;
diff --git a/indra/newview/llfloatereditsky.cpp b/indra/newview/llfloatereditsky.cpp
index c2b7bb17da..763f9e4d5a 100644
--- a/indra/newview/llfloatereditsky.cpp
+++ b/indra/newview/llfloatereditsky.cpp
@@ -152,7 +152,7 @@ void LLFloaterEditSky::initCallbacks(void)
LLRegionInfoModel::instance().setUpdateCallback(boost::bind(&LLFloaterEditSky::onRegionInfoUpdate, this));
//-------------------------------------------------------------------------
-#if SUPPORT_LEGACY_ATMOSPHERICS
+// LEGACY_ATMOSPHERICS
// ambient
getChild<LLUICtrl>("WLAmbient")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &mSkyAdapter->mAmbient));
@@ -166,7 +166,6 @@ void LLFloaterEditSky::initCallbacks(void)
getChild<LLUICtrl>("WLDensityMult")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mDensityMult));
getChild<LLUICtrl>("WLDistanceMult")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mDistanceMult));
getChild<LLUICtrl>("WLMaxAltitude")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mMaxAlt));
-#endif
// sunlight
getChild<LLUICtrl>("WLSunlight")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &mSkyAdapter->mSunlight));
@@ -221,7 +220,7 @@ void LLFloaterEditSky::syncControls()
mSkyPresetNameEditor->setText(name);
mSkyPresetCombo->setValue(name);
-#if SUPPORT_LEGACY_ATMOSPHERICS
+// LEGACY_ATMOSPHERICS
// ambient
mSkyAdapter->mAmbient.setColor3( psky->getAmbientColor() );
setColorSwatch("WLAmbient", mSkyAdapter->mAmbient, WL_SUN_AMBIENT_SLIDER_SCALE);
@@ -243,7 +242,6 @@ void LLFloaterEditSky::syncControls()
mSkyAdapter->mDistanceMult = psky->getDistanceMultiplier();
childSetValue("WLDistanceMult", (F32) mSkyAdapter->mDistanceMult);
childSetValue("WLMaxAltitude", (F32) mSkyAdapter->mMaxAlt);
-#endif
// Lighting
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index 8cb182b18b..f57de011f8 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -429,7 +429,7 @@ LLSD LLSettingsVOSky::convertToLegacy(const LLSettingsSky::ptr_t &psky)
LLSD settings = psky->getSettings();
// These will need to be inferred from new settings' density profiles
-#if SUPPORT_LEGACY_ATMOSPHERICS
+// LEGACY_ATMOSPHERICS
legacy[SETTING_AMBIENT] = ensureArray4(settings[SETTING_AMBIENT], 1.0f);
legacy[SETTING_BLUE_DENSITY] = ensureArray4(settings[SETTING_BLUE_DENSITY], 1.0);
legacy[SETTING_BLUE_HORIZON] = ensureArray4(settings[SETTING_BLUE_HORIZON], 1.0);
@@ -437,7 +437,6 @@ LLSD LLSettingsVOSky::convertToLegacy(const LLSettingsSky::ptr_t &psky)
legacy[SETTING_DISTANCE_MULTIPLIER] = LLSDArray(settings[SETTING_DISTANCE_MULTIPLIER].asReal())(0.0f)(0.0f)(1.0f);
legacy[SETTING_HAZE_DENSITY] = LLSDArray(settings[SETTING_HAZE_DENSITY])(0.0f)(0.0f)(1.0f);
legacy[SETTING_HAZE_HORIZON] = LLSDArray(settings[SETTING_HAZE_HORIZON])(0.0f)(0.0f)(1.0f);
-#endif
legacy[SETTING_CLOUD_COLOR] = ensureArray4(settings[SETTING_CLOUD_COLOR], 1.0);
legacy[SETTING_CLOUD_POS_DENSITY1] = ensureArray4(settings[SETTING_CLOUD_POS_DENSITY1], 1.0);
@@ -498,7 +497,7 @@ LLSettingsSky::parammapping_t LLSettingsVOSky::getParameterMap() const
if (param_map.empty())
{
-#if SUPPORT_LEGACY_ATMOSPHERICS
+// LEGACY_ATMOSPHERICS
param_map[SETTING_AMBIENT] = LLShaderMgr::AMBIENT;
param_map[SETTING_BLUE_DENSITY] = LLShaderMgr::BLUE_DENSITY;
param_map[SETTING_BLUE_HORIZON] = LLShaderMgr::BLUE_HORIZON;
@@ -506,7 +505,6 @@ LLSettingsSky::parammapping_t LLSettingsVOSky::getParameterMap() const
param_map[SETTING_HAZE_HORIZON] = LLShaderMgr::HAZE_HORIZON;
param_map[SETTING_DENSITY_MULTIPLIER] = LLShaderMgr::DENSITY_MULTIPLIER;
param_map[SETTING_DISTANCE_MULTIPLIER] = LLShaderMgr::DISTANCE_MULTIPLIER;
-#endif
param_map[SETTING_CLOUD_COLOR] = LLShaderMgr::CLOUD_COLOR;
param_map[SETTING_CLOUD_POS_DENSITY2] = LLShaderMgr::CLOUD_POS_DENSITY2;
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index c1ba7b1efd..f27bfcb959 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -397,7 +397,7 @@ void LLVOSky::init()
calcAtmospherics();
-#if SUPPORT_LEGACY_ATMOSPHERICS
+// LEGACY_ATMOSPHERICS
// Initialize the cached normalized direction vectors
for (S32 side = 0; side < 6; ++side)
{
@@ -413,7 +413,6 @@ void LLVOSky::init()
mSkyTex[i].create(1.0f);
mShinyTex[i].create(1.0f);
}
-#endif
initCubeMap();
mInitialized = true;
@@ -496,7 +495,7 @@ void LLVOSky::restoreGL()
}
-#if SUPPORT_LEGACY_ATMOSPHERICS
+// LEGACY_ATMOSPHERICS
void LLVOSky::initSkyTextureDirs(const S32 side, const S32 tile)
{
S32 tile_x = tile % NUM_TILES_X;
@@ -830,7 +829,6 @@ LLColor3 LLVOSky::createAmbientFromWL(LLColor3 ambient, LLColor3 sundiffuse, LLC
{
return (componentMult(ambient, sundiffuse) + sunambient) * 0.8f;
}
-#endif
void LLVOSky::calcAtmospherics(void)
{
@@ -882,7 +880,7 @@ BOOL LLVOSky::updateSky()
return TRUE;
}
-#if SUPPORT_LEGACY_ATMOSPHERICS
+// LEGACY_ATMOSPHERICS
static S32 next_frame = 0;
const S32 total_no_tiles = 6 * NUM_TILES;
const S32 cycle_frame_no = total_no_tiles + 1;
@@ -1001,7 +999,6 @@ BOOL LLVOSky::updateSky()
{
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE);
}
-#endif
return TRUE;
}
@@ -1865,7 +1862,7 @@ void LLVOSky::updateReflectionGeometry(LLDrawable *drawable, F32 H,
void LLVOSky::updateFog(const F32 distance)
{
-#if SUPPORT_LEGACY_ATMOSPHERICS
+// LEGACY_ATMOSPHERICS
if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FOG))
{
if (!LLGLSLShader::sNoFixedFunction)
@@ -2010,9 +2007,6 @@ void LLVOSky::updateFog(const F32 distance)
glHint(GL_FOG_HINT, GL_NICEST);
}
stop_glerror();
-
-#endif
-
}
diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h
index 4f6bc55bbe..2c253aed51 100644
--- a/indra/newview/llvosky.h
+++ b/indra/newview/llvosky.h
@@ -383,7 +383,7 @@ class LLVOSky : public LLStaticViewerObject
public:
void calcAtmospherics(void);
-#if SUPPORT_LEGACY_ATMOSPHERICS
+// LEGACY_ATMOSPHERICS
LLColor3 createDiffuseFromWL(LLColor3 diffuse, LLColor3 ambient, LLColor3 sundiffuse, LLColor3 sunambient);
LLColor3 createAmbientFromWL(LLColor3 ambient, LLColor3 sundiffuse, LLColor3 sunambient);
@@ -403,7 +403,6 @@ public:
}
void initSkyTextureDirs(const S32 side, const S32 tile);
void createSkyTexture(const S32 side, const S32 tile);
-#endif
enum
{