summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2020-04-08 14:40:01 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2020-04-08 14:40:01 +0100
commit5c7e91f62fb8d76f437a751503c4e40f0c0fedf1 (patch)
treee3e003fe1ee5bdd5d9d225ce12d7efb09c44703e
parentb5b2d253f6306f20b67083258bd143c846c809a9 (diff)
SL-12996 - replace checks of VisualMuteSettings with OverallAppearance
-rw-r--r--indra/newview/lldrawpoolavatar.cpp10
-rw-r--r--indra/newview/llviewerpartsource.cpp2
-rw-r--r--indra/newview/llvoavatar.h8
-rw-r--r--indra/newview/pipeline.cpp2
4 files changed, 15 insertions, 7 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 63abadbcf4..636e5b7366 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -559,9 +559,9 @@ void LLDrawPoolAvatar::renderShadow(S32 pass)
BOOL impostor = avatarp->isImpostor();
if (impostor
- && LLVOAvatar::AV_DO_NOT_RENDER != avatarp->getVisualMuteSettings()
- && LLVOAvatar::AV_ALWAYS_RENDER != avatarp->getVisualMuteSettings())
+ && LLVOAvatar::AOA_NORMAL != avatarp->getOverallAppearance())
{
+ // No shadows for jellydolled or invisible avs.
return;
}
@@ -1387,7 +1387,8 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
if (( avatarp->isInMuteList()
|| impostor
- || (LLVOAvatar::AV_DO_NOT_RENDER == avatarp->getVisualMuteSettings() && !avatarp->needsImpostorUpdate()) ) && pass != 0)
+ || (LLVOAvatar::AOA_NORMAL != avatarp->getOverallAppearance() && !avatarp->needsImpostorUpdate()) ) && pass != 0)
+// || (LLVOAvatar::AV_DO_NOT_RENDER == avatarp->getVisualMuteSettings() && !avatarp->needsImpostorUpdate()) ) && pass != 0)
{ //don't draw anything but the impostor for impostored avatars
return;
}
@@ -1404,7 +1405,8 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
LLVOAvatar::sNumVisibleAvatars++;
}
- if (impostor || (LLVOAvatar::AV_DO_NOT_RENDER == avatarp->getVisualMuteSettings() && !avatarp->needsImpostorUpdate()))
+// if (impostor || (LLVOAvatar::AV_DO_NOT_RENDER == avatarp->getVisualMuteSettings() && !avatarp->needsImpostorUpdate()))
+ if (impostor || (LLVOAvatar::AOA_NORMAL != avatarp->getOverallAppearance() && !avatarp->needsImpostorUpdate()))
{
if (LLPipeline::sRenderDeferred && !LLPipeline::sReflectionRender && avatarp->mImpostor.isComplete())
{
diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp
index 998ae52fe0..f042040e98 100644
--- a/indra/newview/llviewerpartsource.cpp
+++ b/indra/newview/llviewerpartsource.cpp
@@ -136,7 +136,7 @@ void LLViewerPartSourceScript::update(const F32 dt)
{
mOwnerAvatarp = find_avatar(mOwnerUUID);
}
- if (mOwnerAvatarp.notNull() && LLVOAvatar::AV_DO_NOT_RENDER == mOwnerAvatarp->getVisualMuteSettings())
+ if (mOwnerAvatarp.notNull() && LLVOAvatar::AOA_NORMAL != mOwnerAvatarp->getOverallAppearance())
{
return;
}
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index ed0fc5a9d4..2239e7b23e 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -91,6 +91,7 @@ class LLVOAvatar :
public:
friend class LLVOAvatarSelf;
+ friend class LLAvatarCheckImpostorMode;
/********************************************************************************
** **
@@ -439,8 +440,13 @@ public:
AV_ALWAYS_RENDER = 2
};
void setVisualMuteSettings(VisualMuteSettings set);
+
+protected:
+ // If you think you need to access this outside LLVOAvatar, you probably want getOverallAppearance()
VisualMuteSettings getVisualMuteSettings() { return mVisuallyMuteSetting; };
+public:
+
// Overall Appearance is an output. Depending on whether the
// avatar is blocked/muted, whether it exceeds the complexity
// threshold, etc, avatar will want to be displayed in one of
@@ -467,7 +473,7 @@ public:
static void restoreGL();
S32 mSpecialRenderMode; // special lighting
- private:
+private:
F32 mAttachmentSurfaceArea; //estimated surface area of attachments
U32 mAttachmentVisibleTriangleCount;
F32 mAttachmentEstTriangleCount;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index bec33790bd..bfcc74dc70 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -3125,7 +3125,7 @@ void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera)
LLVOAvatar* av = vobj->asAvatar();
if (av && (av->isImpostor()
|| av->isInMuteList()
- || (LLVOAvatar::AV_DO_NOT_RENDER == av->getVisualMuteSettings() && !av->needsImpostorUpdate()) ))
+ || (LLVOAvatar::AOA_NORMAL != av->getOverallAppearance() && !av->needsImpostorUpdate()) ))
{
return;
}