summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2012-07-16 14:31:15 -0500
committerDave Parks <davep@lindenlab.com>2012-07-16 14:31:15 -0500
commitccac47c1a71884c04a00d95358770b170f346fbd (patch)
tree0cf6107160c05edd6620e5f1f618416aae1da446 /indra/newview/llvovolume.cpp
parentf5254d532bff2307da3a4f07adea6c58447c8aa6 (diff)
MAINT-1223 Fix for alpha updates not triggering LoD updates.
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index c4e7ea44b4..7ccb6dc8dc 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1879,7 +1879,8 @@ S32 LLVOVolume::setTEColor(const U8 te, const LLColor4& color)
}
else if (color != tep->getColor())
{
- if (color.mV[3] != tep->getColor().mV[3])
+ F32 old_alpha = tep->getColor().mV[3];
+ if (color.mV[3] != old_alpha)
{
gPipeline.markTextured(mDrawable);
}
@@ -1889,6 +1890,12 @@ S32 LLVOVolume::setTEColor(const U8 te, const LLColor4& color)
// These should only happen on updates which are not the initial update.
mDrawable->setState(LLDrawable::REBUILD_COLOR);
dirtyMesh();
+
+ if (old_alpha >= 1.f || color.mV[3] <= 0.f)
+ { //treat this alpha change as an LoD update since render batches will need to get rebuilt
+ mLODChanged = TRUE;
+ gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, FALSE);
+ }
}
}