diff options
author | Adam Moss <moss@lindenlab.com> | 2009-06-20 09:17:56 +0000 |
---|---|---|
committer | Adam Moss <moss@lindenlab.com> | 2009-06-20 09:17:56 +0000 |
commit | 8ed056fde9fe5fc9755158013a5cb8be73066e2c (patch) | |
tree | d7f5f6de35c99ca645e48dc8817d908cc6d2f348 /indra/newview/llvovolume.cpp | |
parent | 351ebe9fcb76f3b99c2957004bb8493a904869ee (diff) |
svn merge -r124872:124873
svn+ssh://svn.lindenlab.com/svn/linden/branches/viewer/viewer-1.23.threefour-merge-1a
QAR-1592 Merge of changes between 1.23 RC2 and 1.23 Final to trunk
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r-- | indra/newview/llvovolume.cpp | 54 |
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) |