diff options
author | Nyx (Neal Orman) <nyx@lindenlab.com> | 2010-05-25 19:30:08 -0400 |
---|---|---|
committer | Nyx (Neal Orman) <nyx@lindenlab.com> | 2010-05-25 19:30:08 -0400 |
commit | 35f585ec7a7ca7982fa33eefb383ef3f0316ea5f (patch) | |
tree | 956f9cd88ddbbb1c131397e5868bd1221dedb965 /indra/newview/llvoavatarself.cpp | |
parent | 61dfb969ea3d8ddf561c0ef8ae0a6a4b8b34a4c4 (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/llvoavatarself.cpp')
-rw-r--r-- | indra/newview/llvoavatarself.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index cf3fb01b5a..ebca12dee8 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1332,6 +1332,32 @@ BOOL LLVOAvatarSelf::isTextureDefined(LLVOAvatarDefines::ETextureIndex type, U32 return isDefined; } +//virtual +BOOL LLVOAvatarSelf::isTextureVisible(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const +{ + if (isIndexBakedTexture(type)) + { + return LLVOAvatar::isTextureVisible(type,0); + } + + LLUUID tex_id = getLocalTextureID(type,index); + return (tex_id != IMG_INVISIBLE) + || (LLDrawPoolAlpha::sShowDebugAlpha); +} + +//virtual +BOOL LLVOAvatarSelf::isTextureVisible(LLVOAvatarDefines::ETextureIndex type, LLWearable *wearable) const +{ + if (isIndexBakedTexture(type)) + { + return isTextureVisible(type); + } + + U32 index = gAgentWearables.getWearableIndex(wearable); + return isTextureVisible(type,index); +} + + //----------------------------------------------------------------------------- // requestLayerSetUploads() //----------------------------------------------------------------------------- |