From ccac47c1a71884c04a00d95358770b170f346fbd Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 16 Jul 2012 14:31:15 -0500 Subject: MAINT-1223 Fix for alpha updates not triggering LoD updates. --- indra/newview/lldrawable.cpp | 12 ------------ indra/newview/llface.cpp | 15 ++++++++++++++- indra/newview/llvovolume.cpp | 9 ++++++++- indra/newview/llvovolume.h | 3 ++- 4 files changed, 24 insertions(+), 15 deletions(-) diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 98246162f0..108ec92f6d 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -783,18 +783,6 @@ void LLDrawable::updateTexture() if (getVOVolume()) { - /*if (isActive()) - { - if (isRoot()) - { - mQuietCount = 0; - } - else - { - getParent()->mQuietCount = 0; - } - }*/ - gPipeline.markRebuild(this, LLDrawable::REBUILD_MATERIAL, TRUE); } } diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 2d84c5d7de..373b1930f5 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -326,7 +326,20 @@ void LLFace::setTexture(LLViewerTexture* tex) void LLFace::dirtyTexture() { - gPipeline.markTextured(getDrawable()); + LLDrawable* drawablep = getDrawable(); + + if (mVObjp.notNull() && mVObjp->getVolume() && + mTexture.notNull() && mTexture->getComponents() == 4) + { //dirty texture on an alpha object should be treated as an LoD update + LLVOVolume* vobj = drawablep->getVOVolume(); + if (vobj) + { + vobj->mLODChanged = TRUE; + } + gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME, FALSE); + } + + gPipeline.markTextured(drawablep); } void LLFace::switchTexture(LLViewerTexture* new_texture) 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); + } } } diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index c4505b4bd8..29e782e9dd 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -340,7 +340,8 @@ public: U8 mTexAnimMode; private: friend class LLDrawable; - + friend class LLFace; + BOOL mFaceMappingChanged; LLFrameTimer mTextureUpdateTimer; S32 mLOD; -- cgit v1.2.3 From 291be170781b3a33769cb23c15322dd56b2c8025 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 17 Jul 2012 12:16:22 -0400 Subject: tag merge of DRTVWR-183 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index bf98b38894..f09813ae82 100644 --- a/.hgtags +++ b/.hgtags @@ -338,3 +338,4 @@ f91d003091a61937a044652c4c674447f7dcbb7a 3.3.4-beta1 82b5330bc8b17d0d4b598832e9c5a92e90075682 3.3.4-beta2 eb539c65e6ee26eea2bf373af2d0f4b52dc91289 DRTVWR-177 a8057e1b9a1246b434a27405be35e030f7d28b0c 3.3.4-beta3 +5c08e1d8edd871807153603b690e3ee9dbb548aa DRTVWR-183 -- cgit v1.2.3 From c906d640048645df2e4702914ca8ec46add34e6d Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 17 Jul 2012 13:18:12 -0400 Subject: Added tag 3.3.4-beta4 for changeset 6c75f220b103 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 1a37fe9952..560ff80b26 100644 --- a/.hgtags +++ b/.hgtags @@ -340,3 +340,4 @@ eb539c65e6ee26eea2bf373af2d0f4b52dc91289 DRTVWR-177 a8057e1b9a1246b434a27405be35e030f7d28b0c 3.3.4-beta3 4281aa899fb2cedb7a9ca7ce91c5c29d4aa69594 DRTVWR-180 5c08e1d8edd871807153603b690e3ee9dbb548aa DRTVWR-183 +6c75f220b103db1420919c8b635fe53e2177f318 3.3.4-beta4 -- cgit v1.2.3