summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolavatar.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-05-01 01:55:21 -0500
committerDave Parks <davep@lindenlab.com>2010-05-01 01:55:21 -0500
commit2f95a549a365ca2bedf7824014a687b3af88e20f (patch)
tree26d87b108ffd4730d29ae9ebed2f34154c904e86 /indra/newview/lldrawpoolavatar.cpp
parentad8fb0e1bb6c242cc84aa3d2cfaabc9ee36e39b6 (diff)
Fullbrigt skinned and fix for silly crash from not removing face references.
Diffstat (limited to 'indra/newview/lldrawpoolavatar.cpp')
-rw-r--r--indra/newview/lldrawpoolavatar.cpp40
1 files changed, 39 insertions, 1 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 02c7e3bb6f..9463be6059 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -364,7 +364,7 @@ S32 LLDrawPoolAvatar::getNumPasses()
}
else if (getVertexShaderLevel() > 0)
{
- return 5;
+ return 6;
}
else
{
@@ -411,6 +411,9 @@ void LLDrawPoolAvatar::beginRenderPass(S32 pass)
beginRiggedSimple();
break;
case 4:
+ beginRiggedFullbright();
+ break;
+ case 5:
beginRiggedShinySimple();
break;
}
@@ -441,6 +444,9 @@ void LLDrawPoolAvatar::endRenderPass(S32 pass)
endRiggedSimple();
break;
case 4:
+ endRiggedFullbright();
+ break;
+ case 5:
endRiggedShinySimple();
break;
}
@@ -644,6 +650,22 @@ void LLDrawPoolAvatar::endRiggedSimple()
LLVertexBuffer::sWeight4Loc = -1;
}
+void LLDrawPoolAvatar::beginRiggedFullbright()
+{
+ sVertexProgram = &gSkinnedObjectFullbrightProgram;
+ diffuse_channel = 0;
+ gSkinnedObjectFullbrightProgram.bind();
+ LLVertexBuffer::sWeight4Loc = gSkinnedObjectFullbrightProgram.getAttribLocation(LLViewerShaderMgr::OBJECT_WEIGHT);
+}
+
+void LLDrawPoolAvatar::endRiggedFullbright()
+{
+ sVertexProgram = NULL;
+ LLVertexBuffer::unbind();
+ gSkinnedObjectFullbrightProgram.unbind();
+ LLVertexBuffer::sWeight4Loc = -1;
+}
+
void LLDrawPoolAvatar::beginRiggedShinySimple()
{
sVertexProgram = &gSkinnedObjectShinySimpleProgram;
@@ -826,6 +848,12 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
if (pass == 4)
{
+ renderRiggedFullbright(avatarp);
+ return;
+ }
+
+ if (pass == 5)
+ {
renderRiggedShinySimple(avatarp);
return;
}
@@ -990,6 +1018,16 @@ void LLDrawPoolAvatar::renderRiggedSimple(LLVOAvatar* avatar)
renderRigged(avatar, RIGGED_SIMPLE, data_mask);
}
+void LLDrawPoolAvatar::renderRiggedFullbright(LLVOAvatar* avatar)
+{
+ const U32 data_mask = LLVertexBuffer::MAP_VERTEX |
+ LLVertexBuffer::MAP_TEXCOORD0 |
+ LLVertexBuffer::MAP_COLOR |
+ LLVertexBuffer::MAP_WEIGHT4;
+
+ renderRigged(avatar, RIGGED_FULLBRIGHT, data_mask);
+}
+
void LLDrawPoolAvatar::renderRiggedShinySimple(LLVOAvatar* avatar)
{