summaryrefslogtreecommitdiff
path: root/indra/newview/llface.cpp
diff options
context:
space:
mode:
authorruslantproductengine <ruslantproductengine@lindenlab.com>2015-01-07 02:04:03 +0200
committerruslantproductengine <ruslantproductengine@lindenlab.com>2015-01-07 02:04:03 +0200
commit00f53244c8dacfb65def11445823761917bf25bc (patch)
tree82193d4aa857b3c2b47410a0cab4549c664ad4b1 /indra/newview/llface.cpp
parent65b8b0899dea510ba14378811972e0712b3869c3 (diff)
MAINT-4773 FIXED Some transparent textures are rendered as white.
This bug fix related also to MAINT-4092. In 4092 sometimes when we don't have information about the texture during the setup the materail (LLVOVolume::setTEMaterialParams()), we should substitute the material with disabled "diffuse alpha mode" (for detail in cases see MAINT-4092 JIRA ticket comment). This bug fix cover the case when after the loading texture we have all information about alpha mode, and in this case we should restore diffuse alpha mode if need. In short: now we always believe that information about the material is valid (LLVOVolume::setTEMaterialParams()). Of course before setup it we check information about texture (if it possible) , if texture is not exist in database or not 32 bit depth (for diffuse) we made changes. But in all other cases (if we can't receive information about texture) we remeber this case in mWaitingTextureInfo multimap. When information about texture will be available we get it in: LLVOVolume::notify AboutCreatingTexture() or Volume::notifyAboutMissingAsset() and again, we recheck it and if need change (substitute) the material parameters. I suppose that this solution is better than was before. If this patch will be accepted , I think that MAINT-4092 should be rechecked again.
Diffstat (limited to 'indra/newview/llface.cpp')
-rwxr-xr-xindra/newview/llface.cpp42
1 files changed, 35 insertions, 7 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index dc74f4a6ef..de349a03d4 100755
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -330,24 +330,52 @@ void LLFace::dirtyTexture()
{
vobj->mLODChanged = TRUE;
- LLVOAvatar* avatar = vobj->getAvatar();
- if (avatar)
- { //avatar render cost may have changed
- avatar->updateVisualComplexity();
- }
+ LLVOAvatar* avatar = vobj->getAvatar();
+ if (avatar)
+ { //avatar render cost may have changed
+ avatar->updateVisualComplexity();
+ }
}
gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME, FALSE);
}
}
}
-
+
gPipeline.markTextured(drawablep);
}
+void LLFace::notifyAboutCreatingTexture(LLViewerTexture *texture)
+{
+ LLDrawable* drawablep = getDrawable();
+ if(mVObjp.notNull() && mVObjp->getVolume())
+ {
+ LLVOVolume *vobj = drawablep->getVOVolume();
+ if(vobj && vobj->notifyAboutCreatingTexture(texture))
+ {
+ gPipeline.markTextured(drawablep);
+ gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME);
+ }
+ }
+}
+
+void LLFace::notifyAboutMissingAsset(LLViewerTexture *texture)
+{
+ LLDrawable* drawablep = getDrawable();
+ if(mVObjp.notNull() && mVObjp->getVolume())
+ {
+ LLVOVolume *vobj = drawablep->getVOVolume();
+ if(vobj && vobj->notifyAboutMissingAsset(texture))
+ {
+ gPipeline.markTextured(drawablep);
+ gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME);
+ }
+ }
+}
+
void LLFace::switchTexture(U32 ch, LLViewerTexture* new_texture)
{
llassert(ch < LLRender::NUM_TEXTURE_CHANNELS);
-
+
if(mTexture[ch] == new_texture)
{
return ;