summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2012-07-17 13:00:33 -0500
committerDave Parks <davep@lindenlab.com>2012-07-17 13:00:33 -0500
commit636e20be10c474adcac5a647e0668c58bfa0c443 (patch)
tree072c9ee10a2eeecf5d745d6e5766fd68eb997879
parentccac47c1a71884c04a00d95358770b170f346fbd (diff)
MAINT-1223 More aggressive rebuilding of render batches when alpha color values change.
-rw-r--r--indra/newview/llvovolume.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 7ccb6dc8dc..5ea13ee0a6 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1883,6 +1883,9 @@ S32 LLVOVolume::setTEColor(const U8 te, const LLColor4& color)
if (color.mV[3] != old_alpha)
{
gPipeline.markTextured(mDrawable);
+ //treat this alpha change as an LoD update since render batches may need to get rebuilt
+ mLODChanged = TRUE;
+ gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, FALSE);
}
retval = LLPrimitive::setTEColor(te, color);
if (mDrawable.notNull() && retval)
@@ -1890,12 +1893,6 @@ 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);
- }
}
}