summaryrefslogtreecommitdiff
path: root/indra/newview/llface.cpp
diff options
context:
space:
mode:
authorBrett Joseph <bjoseph@vivox.com>2015-05-11 09:52:18 -0400
committerBrett Joseph <bjoseph@vivox.com>2015-05-11 09:52:18 -0400
commit43b7fe66db159faaa84d545f97818e7a6f0f6920 (patch)
tree6581ed36e716f6aa57b01f2861d6812294fb2261 /indra/newview/llface.cpp
parent7cc3e9b3cf8d70fce2ba0d4a398824e599fc8c5d (diff)
parente611e35e033e99f619b0e4938f6879c8e387efd5 (diff)
Merged lindenlab/viewer-tools-update into default
Diffstat (limited to 'indra/newview/llface.cpp')
-rwxr-xr-xindra/newview/llface.cpp62
1 files changed, 47 insertions, 15 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 32b510b21a..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 ;
@@ -956,6 +984,10 @@ void LLFace::getPlanarProjectedParams(LLQuaternion* face_rot, LLVector3* face_po
const LLVolumeFace& vf = getViewerObject()->getVolume()->getVolumeFace(mTEOffset);
const LLVector4a& normal4a = vf.mNormals[0];
const LLVector4a& tangent = vf.mTangents[0];
+ if (!&tangent)
+ {
+ return;
+ }
LLVector4a binormal4a;
binormal4a.setCross3(normal4a, tangent);
@@ -1299,15 +1331,15 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
}
if (shiny_in_alpha)
- {
-
- GLfloat alpha[4] =
{
- 0.00f,
- 0.25f,
- 0.5f,
- 0.75f
- };
+
+ static const GLfloat alpha[4] =
+ {
+ 0.00f,
+ 0.25f,
+ 0.5f,
+ 0.75f
+ };
llassert(tep->getShiny() <= 3);
color.mV[3] = U8 (alpha[tep->getShiny()] * 255);