summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2010-05-25 19:30:08 -0400
committerNyx (Neal Orman) <nyx@lindenlab.com>2010-05-25 19:30:08 -0400
commit35f585ec7a7ca7982fa33eefb383ef3f0316ea5f (patch)
tree956f9cd88ddbbb1c131397e5868bd1221dedb965 /indra/newview/llvoavatar.cpp
parent61dfb969ea3d8ddf561c0ef8ae0a6a4b8b34a4c4 (diff)
EXT-7392 WIP correct implementation of isTextureVisible()
This is needed so that we don't duplicate this functionality for EXT-7392. Its late, so will be reviewed tomorrow (but before code is pushed!)
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r--indra/newview/llvoavatar.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 4371396629..76aa2ae0f1 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -7887,3 +7887,26 @@ BOOL LLVOAvatar::isTextureDefined(LLVOAvatarDefines::ETextureIndex te, U32 index
getImage(te, index)->getID() != IMG_DEFAULT);
}
+//virtual
+BOOL LLVOAvatar::isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const
+{
+ if (isIndexLocalTexture(type))
+ {
+ return isTextureDefined(type, index);
+ }
+ else
+ {
+ // baked textures can use TE images directly
+ return ((isTextureDefined(type) || isSelf())
+ && (getTEImage(type)->getID() != IMG_INVISIBLE
+ || LLDrawPoolAlpha::sShowDebugAlpha));
+ }
+}
+
+//virtual
+BOOL LLVOAvatar::isTextureVisible(LLVOAvatarDefines::ETextureIndex type, LLWearable *wearable) const
+{
+ // non-self avatars don't have wearables
+ return FALSE;
+}
+