aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2009-01-28 20:04:52 -0600
committerJacek Antonelli2009-01-28 20:05:02 -0600
commit0ef11cf31364456ec247b0fc7ad8f6d1de408400 (patch)
tree50754b286468147a70271253a2a74215c80e1354 /linden/indra/newview/llvoavatar.cpp
parentSecond Life viewer sources 1.22.5-RC (diff)
downloadmeta-impy-0ef11cf31364456ec247b0fc7ad8f6d1de408400.zip
meta-impy-0ef11cf31364456ec247b0fc7ad8f6d1de408400.tar.gz
meta-impy-0ef11cf31364456ec247b0fc7ad8f6d1de408400.tar.bz2
meta-impy-0ef11cf31364456ec247b0fc7ad8f6d1de408400.tar.xz
Second Life viewer sources 1.22.6-RC
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llvoavatar.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp
index 42976ed..e29ea78 100644
--- a/linden/indra/newview/llvoavatar.cpp
+++ b/linden/indra/newview/llvoavatar.cpp
@@ -288,7 +288,9 @@ BOOL LLVOAvatar::sJointDebug = FALSE;
288S32 LLVOAvatar::sCurJoint = 0; 288S32 LLVOAvatar::sCurJoint = 0;
289S32 LLVOAvatar::sCurVolume = 0; 289S32 LLVOAvatar::sCurVolume = 0;
290F32 LLVOAvatar::sUnbakedTime = 0.f; 290F32 LLVOAvatar::sUnbakedTime = 0.f;
291F32 LLVOAvatar::sUnbakedUpdateTime = 0.f;
291F32 LLVOAvatar::sGreyTime = 0.f; 292F32 LLVOAvatar::sGreyTime = 0.f;
293F32 LLVOAvatar::sGreyUpdateTime = 0.f;
292 294
293struct LLAvatarTexData 295struct LLAvatarTexData
294{ 296{
@@ -4721,7 +4723,7 @@ void LLVOAvatar::addLocalTextureStats( LLVOAvatar::ELocTexIndex idx, LLViewerIma
4721 desired_pixels = llmin(mPixelArea, (F32)LOCTEX_IMAGE_AREA_OTHER ); 4723 desired_pixels = llmin(mPixelArea, (F32)LOCTEX_IMAGE_AREA_OTHER );
4722 imagep->setBoostLevel(LLViewerImage::BOOST_AVATAR); 4724 imagep->setBoostLevel(LLViewerImage::BOOST_AVATAR);
4723 } 4725 }
4724 imagep->addTextureStats( desired_pixels, texel_area_ratio ); 4726 imagep->addTextureStats( desired_pixels / texel_area_ratio );
4725 if (imagep->getDiscardLevel() < 0) 4727 if (imagep->getDiscardLevel() < 0)
4726 { 4728 {
4727 mHasGrey = TRUE; // for statistics gathering 4729 mHasGrey = TRUE; // for statistics gathering
@@ -4743,7 +4745,7 @@ void LLVOAvatar::addBakedTextureStats( LLViewerImage* imagep, F32 pixel_area, F3
4743{ 4745{
4744 mMaxPixelArea = llmax(pixel_area, mMaxPixelArea); 4746 mMaxPixelArea = llmax(pixel_area, mMaxPixelArea);
4745 mMinPixelArea = llmin(pixel_area, mMinPixelArea); 4747 mMinPixelArea = llmin(pixel_area, mMinPixelArea);
4746 imagep->addTextureStats(pixel_area, texel_area_ratio); 4748 imagep->addTextureStats(pixel_area / texel_area_ratio);
4747 imagep->setBoostLevel(boost_level); 4749 imagep->setBoostLevel(boost_level);
4748} 4750}
4749 4751
@@ -9171,9 +9173,19 @@ void LLVOAvatar::cullAvatarsByPixelArea()
9171 } 9173 }
9172 else 9174 else
9173 { 9175 {
9174 sUnbakedTime += gFrameTimeSeconds; 9176 if (gFrameTimeSeconds != sUnbakedUpdateTime) // only update once per frame
9177 {
9178 sUnbakedUpdateTime = gFrameTimeSeconds;
9179 sUnbakedTime += gFrameIntervalSeconds;
9180 }
9175 if (grey_avatars > 0) 9181 if (grey_avatars > 0)
9176 sGreyTime += gFrameTimeSeconds; 9182 {
9183 if (gFrameTimeSeconds != sGreyUpdateTime) // only update once per frame
9184 {
9185 sGreyUpdateTime = gFrameTimeSeconds;
9186 sGreyTime += gFrameIntervalSeconds;
9187 }
9188 }
9177 } 9189 }
9178} 9190}
9179 9191