diff options
author | richard <none@none> | 2009-12-14 13:07:28 -0800 |
---|---|---|
committer | richard <none@none> | 2009-12-14 13:07:28 -0800 |
commit | 36dae1c1a0ed1c3adeadd5043a9a64c23c31b3e0 (patch) | |
tree | 6f438ddb1c7cbe623fc23e80510be7d0f77693a4 /indra/newview/llvoavatar.cpp | |
parent | 76f062f1fe82d2b19938601800aae3105da7ad7a (diff) | |
parent | a9e409c7071ba74f01158aa7b876a1ad60161fc4 (diff) |
merge
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 93b0ad4a5b..226d85ec99 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5994,7 +5994,7 @@ void LLVOAvatar::updateMeshTextures() else { mBakedTextureDatas[i].mIsLoaded = FALSE; - if ( (i == BAKED_HEAD) || (i == BAKED_UPPER) || (i == BAKED_LOWER) ) + if ( (baked_img->getID() != IMG_INVISIBLE) && ((i == BAKED_HEAD) || (i == BAKED_UPPER) || (i == BAKED_LOWER)) ) { baked_img->setLoadedCallback(onBakedTextureMasksLoaded, MORPH_MASK_REQUESTED_DISCARD, TRUE, TRUE, new LLTextureMaskData( mID )); } @@ -6464,7 +6464,7 @@ void LLVOAvatar::onFirstTEMessageReceived() LLViewerFetchedTexture* image = LLViewerTextureManager::staticCastToFetchedTexture(getImage( mBakedTextureDatas[i].mTextureIndex, 0 ), TRUE) ; mBakedTextureDatas[i].mLastTextureIndex = image->getID(); // If we have more than one texture for the other baked layers, we'll want to call this for them too. - if ( (i == BAKED_HEAD) || (i == BAKED_UPPER) || (i == BAKED_LOWER) ) + if ( (image->getID() != IMG_INVISIBLE) && ((i == BAKED_HEAD) || (i == BAKED_UPPER) || (i == BAKED_LOWER)) ) { image->setLoadedCallback( onBakedTextureMasksLoaded, MORPH_MASK_REQUESTED_DISCARD, TRUE, TRUE, new LLTextureMaskData( mID )); } @@ -7651,6 +7651,9 @@ void LLVOAvatar::getImpostorValues(LLVector3* extents, LLVector3& angle, F32& di void LLVOAvatar::idleUpdateRenderCost() { + static const U32 ARC_BODY_PART_COST = 20; + static const U32 ARC_LIMIT = 2048; + if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHAME)) { return; @@ -7667,7 +7670,7 @@ void LLVOAvatar::idleUpdateRenderCost() { if (isTextureVisible(tex_index)) { - cost +=20; + cost +=ARC_BODY_PART_COST; } } } @@ -7687,7 +7690,6 @@ void LLVOAvatar::idleUpdateRenderCost() const LLDrawable* drawable = attached_object->mDrawable; if (drawable) { - cost += 10; const LLVOVolume* volume = drawable->getVOVolume(); if (volume) { @@ -7698,11 +7700,11 @@ void LLVOAvatar::idleUpdateRenderCost() } } - cost += textures.size() * 5; + cost += textures.size() * LLVOVolume::ARC_TEXTURE_COST; setDebugText(llformat("%d", cost)); - F32 green = 1.f-llclamp(((F32) cost-1024.f)/1024.f, 0.f, 1.f); - F32 red = llmin((F32) cost/1024.f, 1.f); + F32 green = 1.f-llclamp(((F32) cost-(F32)ARC_LIMIT)/(F32)ARC_LIMIT, 0.f, 1.f); + F32 red = llmin((F32) cost/(F32)ARC_LIMIT, 1.f); mText->setColor(LLColor4(red,green,0,1)); } |