Rebuild drawable when alpha changes

This commit is contained in:
Siana Gearz
2012-09-13 06:38:36 +02:00
parent 3ef9e3bc69
commit 7978f5ebfe

View File

@@ -1605,9 +1605,13 @@ 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) && (color.mV[3] == 1.f || old_alpha == 1.f))
{
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)