summaryrefslogtreecommitdiff
path: root/indra/newview/llface.cpp
diff options
context:
space:
mode:
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);