summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolavatar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawpoolavatar.cpp')
-rw-r--r--indra/newview/lldrawpoolavatar.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index a9df63debd..a2308b2529 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -1807,6 +1807,9 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
S32 offset = face->getIndicesStart();
U32 count = face->getIndicesCount();
+ U16 start = face->getGeomStart();
+ U16 end = start + face->getGeomCount()-1;
+
LLDrawable* drawable = face->getDrawable();
if (!drawable)
{
@@ -1862,15 +1865,10 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
LLViewerTexture* tex = face->getTexture(LLRender::DIFFUSE_MAP);
if (tex)
{
- LLGLenum image_format = tex->getPrimaryFormat();
if (tex->getIsAlphaMask())
{
is_alpha_mask = true;
}
- else if (!is_alpha_mask && (image_format == GL_RGBA || image_format == GL_ALPHA))
- {
- is_alpha_blend = true;
- }
}
if (mat)
@@ -1894,6 +1892,7 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
case LLMaterial::DIFFUSE_ALPHA_MODE_NONE:
default:
is_alpha_blend = false;
+ is_alpha_mask = false;
break;
}
}
@@ -1906,6 +1905,15 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
}
}
+ if (tex)
+ {
+ LLGLenum image_format = tex->getPrimaryFormat();
+ if (!is_alpha_mask && (image_format == GL_RGBA || image_format == GL_ALPHA))
+ {
+ is_alpha_blend = true;
+ }
+ }
+
// if this is alpha mask content and we're doing opaques or a non-alpha-mask shadow pass...
if (is_alpha_mask && (LLDrawPoolAvatar::sSkipTransparent || LLDrawPoolAvatar::sShadowPass != SHADOW_PASS_ATTACHMENT_ALPHA_MASK))
{
@@ -1972,9 +1980,6 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
data_mask &= ~LLVertexBuffer::MAP_WEIGHT4;
}
- U16 start = face->getGeomStart();
- U16 end = start + face->getGeomCount()-1;
-
/*if (glow)
{
gGL.diffuseColor4f(0,0,0,face->getTextureEntry()->getGlow());