From 636e20be10c474adcac5a647e0668c58bfa0c443 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 17 Jul 2012 13:00:33 -0500 Subject: MAINT-1223 More aggressive rebuilding of render batches when alpha color values change. --- indra/newview/llvovolume.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'indra/newview/llvovolume.cpp') 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); - } } } -- cgit v1.2.3