diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2009-11-26 09:47:00 +0000 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2009-11-26 09:47:00 +0000 |
commit | 1942e607f8298870b10f4147388cb4f307a8c08e (patch) | |
tree | 4bff4261cf5536c210526e85e42fa3da10ffd5ae /indra/newview/llvoavatar.cpp | |
parent | 664b848bac30a7f3f1177a683e0913c9457dc041 (diff) | |
parent | 35e5a5005e7ab85a640aee08137a96c42e4d55ea (diff) |
merge.
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 75e35e5221..9882dcd6af 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3868,7 +3868,7 @@ U32 LLVOAvatar::renderRigid() return 0; } - if (isTextureVisible(TEX_EYES_BAKED) || mIsDummy) + if (isTextureVisible(TEX_EYES_BAKED) || mIsDummy) { num_indices += mMeshLOD[MESH_ID_EYEBALL_LEFT]->render(mAdjustedPixelArea, TRUE, mIsDummy); num_indices += mMeshLOD[MESH_ID_EYEBALL_RIGHT]->render(mAdjustedPixelArea, TRUE, mIsDummy); @@ -7636,15 +7636,19 @@ void LLVOAvatar::idleUpdateRenderCost() return; } - U32 shame = 0; + U32 cost = 0; + std::set<LLUUID> textures; for (U8 baked_index = 0; baked_index < BAKED_NUM_INDICES; baked_index++) { const LLVOAvatarDictionary::BakedEntry *baked_dict = LLVOAvatarDictionary::getInstance()->getBakedTexture((EBakedTextureIndex)baked_index); ETextureIndex tex_index = baked_dict->mTextureIndex; - if (isTextureVisible(tex_index)) + if ((tex_index != TEX_SKIRT_BAKED) || (isWearingWearableType(WT_SKIRT))) { - shame +=20; + if (isTextureVisible(tex_index)) + { + cost +=20; + } } } @@ -7663,20 +7667,22 @@ void LLVOAvatar::idleUpdateRenderCost() const LLDrawable* drawable = attached_object->mDrawable; if (drawable) { - shame += 10; + cost += 10; const LLVOVolume* volume = drawable->getVOVolume(); if (volume) { - shame += volume->getRenderCost(); + cost += volume->getRenderCost(textures); } } } } } - setDebugText(llformat("%d", shame)); - F32 green = 1.f-llclamp(((F32) shame-1024.f)/1024.f, 0.f, 1.f); - F32 red = llmin((F32) shame/1024.f, 1.f); + cost += textures.size() * 5; + + 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); mText->setColor(LLColor4(red,green,0,1)); } |