diff options
author | Jacek Antonelli | 2009-06-13 13:17:14 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-06-13 13:17:20 -0500 |
commit | 0517fe4322443bdc317f8185590a63134e3f8394 (patch) | |
tree | 942c9c26d0792accc928010a113d123c5409659b /linden/indra/newview/llvovolume.cpp | |
parent | Second Life viewer sources 1.23.2-RC (diff) | |
download | meta-impy-0517fe4322443bdc317f8185590a63134e3f8394.zip meta-impy-0517fe4322443bdc317f8185590a63134e3f8394.tar.gz meta-impy-0517fe4322443bdc317f8185590a63134e3f8394.tar.bz2 meta-impy-0517fe4322443bdc317f8185590a63134e3f8394.tar.xz |
Second Life viewer sources 1.23.3-RC
Diffstat (limited to 'linden/indra/newview/llvovolume.cpp')
-rw-r--r-- | linden/indra/newview/llvovolume.cpp | 43 |
1 files changed, 34 insertions, 9 deletions
diff --git a/linden/indra/newview/llvovolume.cpp b/linden/indra/newview/llvovolume.cpp index 8f11661..c52d2d8 100644 --- a/linden/indra/newview/llvovolume.cpp +++ b/linden/indra/newview/llvovolume.cpp | |||
@@ -653,7 +653,8 @@ LLDrawable *LLVOVolume::createDrawable(LLPipeline *pipeline) | |||
653 | } | 653 | } |
654 | 654 | ||
655 | updateRadius(); | 655 | updateRadius(); |
656 | mDrawable->updateDistance(*LLViewerCamera::getInstance()); | 656 | bool force_update = true; // avoid non-alpha mDistance update being optimized away |
657 | mDrawable->updateDistance(*LLViewerCamera::getInstance(), force_update); | ||
657 | 658 | ||
658 | return mDrawable; | 659 | return mDrawable; |
659 | } | 660 | } |
@@ -1271,15 +1272,28 @@ S32 LLVOVolume::setTEColor(const U8 te, const LLColor3& color) | |||
1271 | 1272 | ||
1272 | S32 LLVOVolume::setTEColor(const U8 te, const LLColor4& color) | 1273 | S32 LLVOVolume::setTEColor(const U8 te, const LLColor4& color) |
1273 | { | 1274 | { |
1274 | S32 res = LLViewerObject::setTEColor(te, color); | 1275 | S32 retval = 0; |
1275 | if (res && mDrawable.notNull()) | 1276 | const LLTextureEntry *tep = getTE(te); |
1277 | if (!tep) | ||
1276 | { | 1278 | { |
1277 | //gPipeline.markTextured(mDrawable); | 1279 | llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl; |
1278 | mDrawable->setState(LLDrawable::REBUILD_COLOR); | ||
1279 | dirtyMesh(); | ||
1280 | //mFaceMappingChanged = TRUE; | ||
1281 | } | 1280 | } |
1282 | return res; | 1281 | else if (color != tep->getColor()) |
1282 | { | ||
1283 | if (color.mV[3] != tep->getColor().mV[3]) | ||
1284 | { | ||
1285 | gPipeline.markTextured(mDrawable); | ||
1286 | } | ||
1287 | retval = LLPrimitive::setTEColor(te, color); | ||
1288 | if (mDrawable.notNull() && retval) | ||
1289 | { | ||
1290 | // These should only happen on updates which are not the initial update. | ||
1291 | mDrawable->setState(LLDrawable::REBUILD_COLOR); | ||
1292 | dirtyMesh(); | ||
1293 | } | ||
1294 | } | ||
1295 | |||
1296 | return retval; | ||
1283 | } | 1297 | } |
1284 | 1298 | ||
1285 | S32 LLVOVolume::setTEBumpmap(const U8 te, const U8 bumpmap) | 1299 | S32 LLVOVolume::setTEBumpmap(const U8 te, const U8 bumpmap) |
@@ -1326,6 +1340,17 @@ S32 LLVOVolume::setTEFullbright(const U8 te, const U8 fullbright) | |||
1326 | return res; | 1340 | return res; |
1327 | } | 1341 | } |
1328 | 1342 | ||
1343 | S32 LLVOVolume::setTEBumpShinyFullbright(const U8 te, const U8 bump) | ||
1344 | { | ||
1345 | S32 res = LLViewerObject::setTEBumpShinyFullbright(te, bump); | ||
1346 | if (res) | ||
1347 | { | ||
1348 | gPipeline.markTextured(mDrawable); | ||
1349 | mFaceMappingChanged = TRUE; | ||
1350 | } | ||
1351 | return res; | ||
1352 | } | ||
1353 | |||
1329 | S32 LLVOVolume::setTEMediaFlags(const U8 te, const U8 media_flags) | 1354 | S32 LLVOVolume::setTEMediaFlags(const U8 te, const U8 media_flags) |
1330 | { | 1355 | { |
1331 | S32 res = LLViewerObject::setTEMediaFlags(te, media_flags); | 1356 | S32 res = LLViewerObject::setTEMediaFlags(te, media_flags); |
@@ -2812,7 +2837,7 @@ LLHUDPartition::LLHUDPartition() | |||
2812 | mPartitionType = LLViewerRegion::PARTITION_HUD; | 2837 | mPartitionType = LLViewerRegion::PARTITION_HUD; |
2813 | mDrawableType = LLPipeline::RENDER_TYPE_HUD; | 2838 | mDrawableType = LLPipeline::RENDER_TYPE_HUD; |
2814 | mSlopRatio = 0.f; | 2839 | mSlopRatio = 0.f; |
2815 | mLODPeriod = 16; | 2840 | mLODPeriod = 1; |
2816 | } | 2841 | } |
2817 | 2842 | ||
2818 | void LLHUDPartition::shift(const LLVector3 &offset) | 2843 | void LLHUDPartition::shift(const LLVector3 &offset) |