diff options
author | Oz Linden <oz@lindenlab.com> | 2015-02-06 09:50:45 -0800 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2015-02-06 09:50:45 -0800 |
commit | 4e1bd474f268e88b424b87806fe4815807b41a49 (patch) | |
tree | 16a65b3fe5ad16fbac80de692fdc42e18034f882 /indra/newview | |
parent | 53fb7f9998fceadc84ee3aefec12806ce87f7772 (diff) |
correct bug in initial av rendering I introduced, clarify several tests
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llvoavatar.cpp | 63 | ||||
-rwxr-xr-x | indra/newview/llvoavatar.h | 2 | ||||
-rwxr-xr-x | indra/newview/llvoavatarself.cpp | 14 | ||||
-rwxr-xr-x | indra/newview/llvoavatarself.h | 2 |
4 files changed, 34 insertions, 47 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 1069a55744..0a35b2bb00 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -767,7 +767,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, LLSceneMonitor::getInstance()->freezeAvatar((LLCharacter*)this); } - mCachedVisualMute = !isSelf(); // default to muting everyone? hmmm.... + mCachedVisualMute = !isSelf(); // default to muting everyone else? hmmm.... mCachedVisualMuteUpdateTime = LLFrameTimer::getTotalSeconds() + 5.0; mVisuallyMuteSetting = VISUAL_MUTE_NOT_SET; @@ -2475,19 +2475,22 @@ void LLVOAvatar::idleUpdateLoadingEffect() // update visibility when avatar is partially loaded if (updateIsFullyLoaded()) // changed? { - if (isFullyLoaded() && mFirstFullyVisible && isSelf()) - { - LL_INFOS("Avatar") << avString() << "self isFullyLoaded, mFirstFullyVisible" << LL_ENDL; - mFirstFullyVisible = FALSE; - LLAppearanceMgr::instance().onFirstFullyVisible(); - } - if (isFullyLoaded() && mFirstFullyVisible && !isSelf()) - { - LL_INFOS("Avatar") << avString() << "other isFullyLoaded, mFirstFullyVisible" << LL_ENDL; - mFirstFullyVisible = FALSE; - } if (isFullyLoaded()) { + if (mFirstFullyVisible) + { + mFirstFullyVisible = FALSE; + if (isSelf()) + { + LL_INFOS("Avatar") << avString() << "self isFullyLoaded, mFirstFullyVisible" << LL_ENDL; + LLAppearanceMgr::instance().onFirstFullyVisible(); + } + else + { + LL_INFOS("Avatar") << avString() << "other isFullyLoaded, mFirstFullyVisible" << LL_ENDL; + } + } + deleteParticleSource(); updateLOD(); } @@ -2520,10 +2523,7 @@ void LLVOAvatar::idleUpdateLoadingEffect() LLPartData::LL_PART_EMISSIVE_MASK | // LLPartData::LL_PART_FOLLOW_SRC_MASK | LLPartData::LL_PART_TARGET_POS_MASK ); - if (!isVisuallyMuted()) // if we are muting the avatar, don't render particles - { - setParticleSource(particle_parameters, getID()); - } + setParticleSource(particle_parameters, getID()); } } } @@ -6135,27 +6135,14 @@ BOOL LLVOAvatar::isVisible() const } // Determine if we have enough avatar data to render -BOOL LLVOAvatar::getIsCloud() const +bool LLVOAvatar::getIsCloud() const { - // Do we have a shape? - if ((const_cast<LLVOAvatar*>(this))->visualParamWeightsAreDefault()) - { - return TRUE; - } - - if (!isTextureDefined(TEX_LOWER_BAKED) || - !isTextureDefined(TEX_UPPER_BAKED) || - !isTextureDefined(TEX_HEAD_BAKED)) - { - return TRUE; - } - - if (isVisuallyMuted()) - { - // we can render the muted representation - return TRUE; - } - return FALSE; + return ( ((const_cast<LLVOAvatar*>(this))->visualParamWeightsAreDefault())// Do we have a shape? + || ( !isTextureDefined(TEX_LOWER_BAKED) + || !isTextureDefined(TEX_UPPER_BAKED) + || !isTextureDefined(TEX_HEAD_BAKED) + ) + ); } void LLVOAvatar::updateRezzedStatusTimers() @@ -6333,7 +6320,7 @@ void LLVOAvatar::logMetricsTimerRecord(const std::string& phase_name, F32 elapse // returns true if the value has changed. BOOL LLVOAvatar::updateIsFullyLoaded() { - const BOOL loading = getIsCloud(); + const bool loading = getIsCloud(); updateRezzedStatusTimers(); updateRuthTimer(loading); return processFullyLoadedChange(loading); @@ -8269,7 +8256,7 @@ LLColor4 LLVOAvatar::calcMutedAVColor(const LLUUID av_id) new_color.normalize(); new_color *= 0.5f; // Tone it down - LL_DEBUGS("AvatarMute") << "avatar "<< av_id << " color " << std::setprecision(3) << color_value << " returning color " << new_color + LL_DEBUGS("AvatarRender") << "avatar "<< av_id << " color " << std::setprecision(3) << color_value << " returning color " << new_color << " using indexes " << spectrum_index_1 << ", " << spectrum_index_2 << " and fractBetween " << fractBetween << LL_ENDL; diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 363f7b9f2a..0cf455db15 100755 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -301,7 +301,7 @@ public: public: BOOL isFullyLoaded() const; bool visualParamWeightsAreDefault(); - virtual BOOL getIsCloud() const; + virtual bool getIsCloud() const; BOOL isFullyTextured() const; BOOL hasGray() const; S32 getRezzedStatus() const; // 0 = cloud, 1 = gray, 2 = textured, 3 = textured and fully downloaded. diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 170a8c41f4..3987d91c5d 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1840,7 +1840,7 @@ void LLVOAvatarSelf::dumpTotalLocalTextureByteCount() LL_INFOS() << "Total Avatar LocTex GL:" << (gl_bytes/1024) << "KB" << LL_ENDL; } -BOOL LLVOAvatarSelf::getIsCloud() const +bool LLVOAvatarSelf::getIsCloud() const { // Let people know why they're clouded without spamming them into oblivion. bool do_warn = false; @@ -1868,7 +1868,7 @@ BOOL LLVOAvatarSelf::getIsCloud() const << (skin_count ? "" : "SKIN ") << LL_ENDL; } - return TRUE; + return true; } if (!isTextureDefined(TEX_HAIR, 0)) @@ -1877,7 +1877,7 @@ BOOL LLVOAvatarSelf::getIsCloud() const { LL_INFOS() << "Self is clouded because of no hair texture" << LL_ENDL; } - return TRUE; + return true; } if (!mPreviousFullyLoaded) @@ -1889,7 +1889,7 @@ BOOL LLVOAvatarSelf::getIsCloud() const { LL_INFOS() << "Self is clouded because lower textures not baked" << LL_ENDL; } - return TRUE; + return true; } if (!isLocalTextureDataAvailable(getLayerSet(BAKED_UPPER)) && @@ -1899,7 +1899,7 @@ BOOL LLVOAvatarSelf::getIsCloud() const { LL_INFOS() << "Self is clouded because upper textures not baked" << LL_ENDL; } - return TRUE; + return true; } for (U32 i = 0; i < mBakedTextureDatas.size(); i++) @@ -1920,13 +1920,13 @@ BOOL LLVOAvatarSelf::getIsCloud() const LL_INFOS() << "Self is clouded because texture at index " << i << " (texture index is " << texture_data.mTextureIndex << ") is not loaded" << LL_ENDL; } - return TRUE; + return true; } } LL_DEBUGS() << "Avatar de-clouded" << LL_ENDL; } - return FALSE; + return false; } /*static*/ diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index 7f641b6242..21b12d0a48 100755 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -128,7 +128,7 @@ public: // Loading state //-------------------------------------------------------------------- public: - /*virtual*/ BOOL getIsCloud() const; + /*virtual*/ bool getIsCloud() const; //-------------------------------------------------------------------- // Region state |