diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llvoavatar.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index 3491dd3..168b005 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp | |||
@@ -769,6 +769,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, | |||
769 | mBakedTextureData[i].mLastTextureIndex = IMG_DEFAULT_AVATAR; | 769 | mBakedTextureData[i].mLastTextureIndex = IMG_DEFAULT_AVATAR; |
770 | mBakedTextureData[i].mTexLayerSet = NULL; | 770 | mBakedTextureData[i].mTexLayerSet = NULL; |
771 | mBakedTextureData[i].mIsLoaded = false; | 771 | mBakedTextureData[i].mIsLoaded = false; |
772 | mBakedTextureData[i].mIsUsed = false; | ||
772 | mBakedTextureData[i].mMaskTexName = 0; | 773 | mBakedTextureData[i].mMaskTexName = 0; |
773 | mBakedTextureData[i].mTextureIndex = getTextureIndex((EBakedTextureIndex)i); | 774 | mBakedTextureData[i].mTextureIndex = getTextureIndex((EBakedTextureIndex)i); |
774 | } | 775 | } |
@@ -4151,8 +4152,11 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass) | |||
4151 | if (pass == AVATAR_RENDER_PASS_SINGLE) | 4152 | if (pass == AVATAR_RENDER_PASS_SINGLE) |
4152 | { | 4153 | { |
4153 | const bool should_alpha_mask = mHasBakedHair && isTextureDefined(TEX_HEAD_BAKED) && isTextureDefined(TEX_UPPER_BAKED) | 4154 | const bool should_alpha_mask = mHasBakedHair && isTextureDefined(TEX_HEAD_BAKED) && isTextureDefined(TEX_UPPER_BAKED) |
4154 | && isTextureDefined(TEX_LOWER_BAKED) && mBakedTextureData[BAKED_HEAD].mIsLoaded | 4155 | && isTextureDefined(TEX_LOWER_BAKED) |
4156 | && mBakedTextureData[BAKED_HEAD].mIsLoaded | ||
4155 | && mBakedTextureData[BAKED_UPPER].mIsLoaded && mBakedTextureData[BAKED_LOWER].mIsLoaded | 4157 | && mBakedTextureData[BAKED_UPPER].mIsLoaded && mBakedTextureData[BAKED_LOWER].mIsLoaded |
4158 | && mBakedTextureData[BAKED_HEAD].mIsUsed | ||
4159 | && mBakedTextureData[BAKED_UPPER].mIsUsed && mBakedTextureData[BAKED_LOWER].mIsUsed | ||
4156 | && !LLDrawPoolAlpha::sShowDebugAlpha // Don't alpha mask if "Highlight Transparent" checked | 4160 | && !LLDrawPoolAlpha::sShowDebugAlpha // Don't alpha mask if "Highlight Transparent" checked |
4157 | && !(isSelf() && gAgent.cameraCustomizeAvatar()); // don't alpha mask if in customize mode | 4161 | && !(isSelf() && gAgent.cameraCustomizeAvatar()); // don't alpha mask if in customize mode |
4158 | 4162 | ||
@@ -4270,7 +4274,11 @@ U32 LLVOAvatar::renderRigid() | |||
4270 | if (isTextureVisible(TEX_EYES_BAKED) || mIsDummy) | 4274 | if (isTextureVisible(TEX_EYES_BAKED) || mIsDummy) |
4271 | { | 4275 | { |
4272 | // If the meshes need to be drawn, enable alpha masking but not blending | 4276 | // If the meshes need to be drawn, enable alpha masking but not blending |
4273 | bool should_alpha_mask = mHasBakedHair && mBakedTextureData[BAKED_EYES].mIsLoaded && !(isSelf() && gAgent.cameraCustomizeAvatar()); | 4277 | bool should_alpha_mask = mHasBakedHair |
4278 | && mBakedTextureData[BAKED_EYES].mIsLoaded | ||
4279 | && mBakedTextureData[BAKED_EYES].mIsUsed | ||
4280 | && !(isSelf() && gAgent.cameraCustomizeAvatar()); | ||
4281 | |||
4274 | LLGLState test(GL_ALPHA_TEST, should_alpha_mask); | 4282 | LLGLState test(GL_ALPHA_TEST, should_alpha_mask); |
4275 | 4283 | ||
4276 | if (should_alpha_mask) | 4284 | if (should_alpha_mask) |
@@ -6905,6 +6913,7 @@ void LLVOAvatar::updateMeshTextures() | |||
6905 | if (use_lkg_baked_layer[i] && !self_customizing ) | 6913 | if (use_lkg_baked_layer[i] && !self_customizing ) |
6906 | { | 6914 | { |
6907 | LLViewerImage* baked_img = gImageList.getImageFromHost( mBakedTextureData[i].mLastTextureIndex, target_host ); | 6915 | LLViewerImage* baked_img = gImageList.getImageFromHost( mBakedTextureData[i].mLastTextureIndex, target_host ); |
6916 | mBakedTextureData[i].mIsUsed = TRUE; | ||
6908 | for (U32 k=0; k < mBakedTextureData[i].mMeshes.size(); k++) | 6917 | for (U32 k=0; k < mBakedTextureData[i].mMeshes.size(); k++) |
6909 | { | 6918 | { |
6910 | mBakedTextureData[i].mMeshes[k]->setTexture( baked_img ); | 6919 | mBakedTextureData[i].mMeshes[k]->setTexture( baked_img ); |
@@ -6934,6 +6943,7 @@ void LLVOAvatar::updateMeshTextures() | |||
6934 | { | 6943 | { |
6935 | mBakedTextureData[i].mTexLayerSet->createComposite(); | 6944 | mBakedTextureData[i].mTexLayerSet->createComposite(); |
6936 | mBakedTextureData[i].mTexLayerSet->setUpdatesEnabled( TRUE ); | 6945 | mBakedTextureData[i].mTexLayerSet->setUpdatesEnabled( TRUE ); |
6946 | mBakedTextureData[i].mIsUsed = FALSE; | ||
6937 | for (U32 k=0; k < mBakedTextureData[i].mMeshes.size(); k++) | 6947 | for (U32 k=0; k < mBakedTextureData[i].mMeshes.size(); k++) |
6938 | { | 6948 | { |
6939 | mBakedTextureData[i].mMeshes[k]->setLayerSet( mBakedTextureData[i].mTexLayerSet ); | 6949 | mBakedTextureData[i].mMeshes[k]->setLayerSet( mBakedTextureData[i].mTexLayerSet ); |
@@ -6944,7 +6954,7 @@ void LLVOAvatar::updateMeshTextures() | |||
6944 | // ! BACKWARDS COMPATIBILITY ! | 6954 | // ! BACKWARDS COMPATIBILITY ! |
6945 | // Workaround for viewing avatars from old viewers that haven't baked hair textures. | 6955 | // Workaround for viewing avatars from old viewers that haven't baked hair textures. |
6946 | // if (!isTextureDefined(mBakedTextureData[BAKED_HAIR].mTextureIndex)) | 6956 | // if (!isTextureDefined(mBakedTextureData[BAKED_HAIR].mTextureIndex)) |
6947 | if (!is_layer_baked[BAKED_HAIR]) | 6957 | if (!is_layer_baked[BAKED_HAIR] || self_customizing) |
6948 | { | 6958 | { |
6949 | const LLColor4 color = mTexHairColor ? mTexHairColor->getColor() : LLColor4(1,1,1,1); | 6959 | const LLColor4 color = mTexHairColor ? mTexHairColor->getColor() : LLColor4(1,1,1,1); |
6950 | LLViewerImage* hair_img = getTEImage( TEX_HAIR ); | 6960 | LLViewerImage* hair_img = getTEImage( TEX_HAIR ); |
@@ -8096,6 +8106,7 @@ void LLVOAvatar::useBakedTexture( const LLUUID& id ) | |||
8096 | if (id == image_baked->getID()) | 8106 | if (id == image_baked->getID()) |
8097 | { | 8107 | { |
8098 | mBakedTextureData[i].mIsLoaded = true; | 8108 | mBakedTextureData[i].mIsLoaded = true; |
8109 | mBakedTextureData[i].mIsUsed = true; | ||
8099 | mBakedTextureData[i].mLastTextureIndex = id; | 8110 | mBakedTextureData[i].mLastTextureIndex = id; |
8100 | for (U32 k = 0; k < mBakedTextureData[i].mMeshes.size(); k++) | 8111 | for (U32 k = 0; k < mBakedTextureData[i].mMeshes.size(); k++) |
8101 | { | 8112 | { |