summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp54
1 files changed, 45 insertions, 9 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 8f11661b30..dd68733d98 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -653,7 +653,8 @@ LLDrawable *LLVOVolume::createDrawable(LLPipeline *pipeline)
}
updateRadius();
- mDrawable->updateDistance(*LLViewerCamera::getInstance());
+ bool force_update = true; // avoid non-alpha mDistance update being optimized away
+ mDrawable->updateDistance(*LLViewerCamera::getInstance(), force_update);
return mDrawable;
}
@@ -1271,15 +1272,28 @@ S32 LLVOVolume::setTEColor(const U8 te, const LLColor3& color)
S32 LLVOVolume::setTEColor(const U8 te, const LLColor4& color)
{
- S32 res = LLViewerObject::setTEColor(te, color);
- if (res && mDrawable.notNull())
+ S32 retval = 0;
+ const LLTextureEntry *tep = getTE(te);
+ if (!tep)
{
- //gPipeline.markTextured(mDrawable);
- mDrawable->setState(LLDrawable::REBUILD_COLOR);
- dirtyMesh();
- //mFaceMappingChanged = TRUE;
+ llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl;
}
- return res;
+ else if (color != tep->getColor())
+ {
+ if (color.mV[3] != tep->getColor().mV[3])
+ {
+ gPipeline.markTextured(mDrawable);
+ }
+ retval = LLPrimitive::setTEColor(te, color);
+ if (mDrawable.notNull() && retval)
+ {
+ // These should only happen on updates which are not the initial update.
+ mDrawable->setState(LLDrawable::REBUILD_COLOR);
+ dirtyMesh();
+ }
+ }
+
+ return retval;
}
S32 LLVOVolume::setTEBumpmap(const U8 te, const U8 bumpmap)
@@ -1304,6 +1318,17 @@ S32 LLVOVolume::setTETexGen(const U8 te, const U8 texgen)
return res;
}
+S32 LLVOVolume::setTEMediaTexGen(const U8 te, const U8 media)
+{
+ S32 res = LLViewerObject::setTEMediaTexGen(te, media);
+ if (res)
+ {
+ gPipeline.markTextured(mDrawable);
+ mFaceMappingChanged = TRUE;
+ }
+ return res;
+}
+
S32 LLVOVolume::setTEShiny(const U8 te, const U8 shiny)
{
S32 res = LLViewerObject::setTEShiny(te, shiny);
@@ -1326,6 +1351,17 @@ S32 LLVOVolume::setTEFullbright(const U8 te, const U8 fullbright)
return res;
}
+S32 LLVOVolume::setTEBumpShinyFullbright(const U8 te, const U8 bump)
+{
+ S32 res = LLViewerObject::setTEBumpShinyFullbright(te, bump);
+ if (res)
+ {
+ gPipeline.markTextured(mDrawable);
+ mFaceMappingChanged = TRUE;
+ }
+ return res;
+}
+
S32 LLVOVolume::setTEMediaFlags(const U8 te, const U8 media_flags)
{
S32 res = LLViewerObject::setTEMediaFlags(te, media_flags);
@@ -2812,7 +2848,7 @@ LLHUDPartition::LLHUDPartition()
mPartitionType = LLViewerRegion::PARTITION_HUD;
mDrawableType = LLPipeline::RENDER_TYPE_HUD;
mSlopRatio = 0.f;
- mLODPeriod = 16;
+ mLODPeriod = 1;
}
void LLHUDPartition::shift(const LLVector3 &offset)