summaryrefslogtreecommitdiff
path: root/indra/llprimitive
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llprimitive')
-rw-r--r--indra/llprimitive/lldaeloader.cpp2
-rw-r--r--indra/llprimitive/llprimitive.h8
2 files changed, 6 insertions, 4 deletions
diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp
index 8f75d89e5a..139f48fef8 100644
--- a/indra/llprimitive/lldaeloader.cpp
+++ b/indra/llprimitive/lldaeloader.cpp
@@ -1784,7 +1784,7 @@ void LLDAELoader::extractTranslationViaElement( daeElement* pTranslateElement, L
{
if ( pTranslateElement )
{
- domTranslate* pTranslateChild = dynamic_cast<domTranslate*>( pTranslateElement );
+ domTranslate* pTranslateChild = static_cast<domTranslate*>( pTranslateElement );
domFloat3 translateChild = pTranslateChild->getValue();
LLVector3 singleJointTranslation( translateChild[0], translateChild[1], translateChild[2] );
transform.setTranslation( singleJointTranslation );
diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h
index 6fd433c337..20b5ad8eff 100644
--- a/indra/llprimitive/llprimitive.h
+++ b/indra/llprimitive/llprimitive.h
@@ -133,6 +133,7 @@ class LLLightParams : public LLNetworkData
{
protected:
LLColor4 mColor; // alpha = intensity
+ LLColor4 mSRGBColor; // Only used in deferred (for now?)
F32 mRadius;
F32 mFalloff;
F32 mCutoff;
@@ -149,13 +150,14 @@ public:
operator LLSD() const { return asLLSD(); }
bool fromLLSD(LLSD& sd);
-
- void setColor(const LLColor4& color) { mColor = color; mColor.clamp(); }
+
+ void setColor(const LLColor4& color) { mColor = color; mColor.clamp(); mSRGBColor = srgbColor4(mColor); }
void setRadius(F32 radius) { mRadius = llclamp(radius, LIGHT_MIN_RADIUS, LIGHT_MAX_RADIUS); }
void setFalloff(F32 falloff) { mFalloff = llclamp(falloff, LIGHT_MIN_FALLOFF, LIGHT_MAX_FALLOFF); }
void setCutoff(F32 cutoff) { mCutoff = llclamp(cutoff, LIGHT_MIN_CUTOFF, LIGHT_MAX_CUTOFF); }
- LLColor4 getColor() const { return mColor; }
+ LLColor4 getColor() const { return mColor; }
+ LLColor4 getSRGBColor() const { return mSRGBColor; }
F32 getRadius() const { return mRadius; }
F32 getFalloff() const { return mFalloff; }
F32 getCutoff() const { return mCutoff; }