Trying alpha-face rebuild using LL's method.

This commit is contained in:
Shyotl
2012-07-26 00:17:38 -05:00
parent eeea2b4de4
commit 726d8248c5
3 changed files with 16 additions and 14 deletions

View File

@@ -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);
}
}

View File

@@ -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)

View File

@@ -297,6 +297,7 @@ public:
U8 mTexAnimMode;
private:
friend class LLDrawable;
friend class LLFace;
BOOL mFaceMappingChanged;
LLFrameTimer mTextureUpdateTimer;