diff options
author | Oz Linden <oz@lindenlab.com> | 2012-07-17 13:21:36 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2012-07-17 13:21:36 -0400 |
commit | 3803a5b5ae4e6937f0c09099a19af44272e09d81 (patch) | |
tree | 8592971fe07c9229f33397fb8279b92ad40de228 /indra | |
parent | 509408f393b8eb58799678adde801675a4d4d600 (diff) | |
parent | c906d640048645df2e4702914ca8ec46add34e6d (diff) |
pull back fixes for 3.3.4-beta4
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/lldrawable.cpp | 12 | ||||
-rw-r--r-- | indra/newview/llface.cpp | 15 | ||||
-rw-r--r-- | indra/newview/llvovolume.cpp | 9 | ||||
-rw-r--r-- | 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 563b9b9cab..89a2e9f407 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -792,18 +792,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 08b5c27a68..8d0664770b 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -317,7 +317,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 082818b112..f31f2320ba 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 5a0960204c..8cb69930be 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; |