summaryrefslogtreecommitdiff
path: root/indra/newview/llface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llface.cpp')
-rw-r--r--indra/newview/llface.cpp36
1 files changed, 32 insertions, 4 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index c6fff6e57a..d502e686c7 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -344,6 +344,34 @@ void LLFace::dirtyTexture()
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);
@@ -1056,7 +1084,7 @@ bool LLFace::canRenderAsMask()
}
LLMaterial* mat = te->getMaterialParams();
- if (mat && mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND)
+ if (mat && !mat->isDiffuseAlphaInvalid() && mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND)
{
return false;
}
@@ -1290,14 +1318,14 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (LLPipeline::sRenderDeferred)
{ //store shiny in alpha if we don't have a specular map
- if (!mat || mat->getSpecularID().isNull())
+ if (!mat || mat->getSpecularID().isNull() || mat->isSpecularInvalid())
{
shiny_in_alpha = true;
}
}
else
{
- if (!mat || mat->getDiffuseAlphaMode() != LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
+ if (!mat || mat->getDiffuseAlphaMode() != LLMaterial::DIFFUSE_ALPHA_MODE_MASK || mat->isDiffuseAlphaInvalid())
{
shiny_in_alpha = true;
}
@@ -1783,7 +1811,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
std::vector<LLVector2> bump_tc;
- if (mat && !mat->getNormalID().isNull())
+ if (mat && !(mat->getNormalID().isNull() || mat->isNormalInvalid()))
{ //writing out normal and specular texture coordinates, not bump offsets
do_bump = false;
}