From 726d8248c5da697dd3ae3ba01bfa24c593c8b61c Mon Sep 17 00:00:00 2001 From: Shyotl Date: Thu, 26 Jul 2012 00:17:38 -0500 Subject: [PATCH] Trying alpha-face rebuild using LL's method. --- indra/newview/lldrawable.cpp | 14 +------------- indra/newview/llface.cpp | 15 ++++++++++++++- indra/newview/llvovolume.h | 1 + 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 89e26ccb1..97b9764ab 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -791,19 +791,7 @@ void LLDrawable::updateTexture() if (getVOVolume()) { - /*if (isActive()) - { - if (isRoot()) - { - mQuietCount = 0; - } - else - { - getParent()->mQuietCount = 0; - } - }*/ - - getVOVolume()->mFaceMappingChanged = TRUE; + //getVOVolume()->mFaceMappingChanged = TRUE; gPipeline.markRebuild(this, LLDrawable::REBUILD_MATERIAL, TRUE); } } diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index fc7a2ae49..ba818ed90 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -319,7 +319,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.h b/indra/newview/llvovolume.h index 9fbc50208..dbf9800db 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -297,6 +297,7 @@ public: U8 mTexAnimMode; private: friend class LLDrawable; + friend class LLFace; BOOL mFaceMappingChanged; LLFrameTimer mTextureUpdateTimer;