diff options
Diffstat (limited to 'indra/newview/lldrawpoolavatar.cpp')
-rw-r--r-- | indra/newview/lldrawpoolavatar.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 012e41383f..9311a5f60e 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -320,7 +320,7 @@ void LLDrawPoolAvatar::renderShadow(S32 pass) S32 LLDrawPoolAvatar::getNumPasses() { - return LLPipeline::sImpostorRender ? 1 : 3; + return LLPipeline::sImpostorRender ? 1 : 4; } void LLDrawPoolAvatar::render(S32 pass) @@ -357,6 +357,8 @@ void LLDrawPoolAvatar::beginRenderPass(S32 pass) break; case 2: beginSkinned(); + case 3: + beginRigged(); break; } } @@ -381,6 +383,10 @@ void LLDrawPoolAvatar::endRenderPass(S32 pass) break; case 2: endSkinned(); + break; + case 3: + endRigged(); + break; } } @@ -566,6 +572,18 @@ void LLDrawPoolAvatar::endSkinned() gGL.getTexUnit(0)->activate(); } +void LLDrawPoolAvatar::beginRigged() +{ + gSkinnedObjectSimpleProgram.bind(); + LLVertexBuffer::sWeight4Loc = gSkinnedObjectSimpleProgram.getAttribLocation(LLViewerShaderMgr::OBJECT_WEIGHT); +} + +void LLDrawPoolAvatar::endRigged() +{ + gSkinnedObjectSimpleProgram.unbind(); + LLVertexBuffer::sWeight4Loc = -1; +} + void LLDrawPoolAvatar::beginDeferredSkinned() { sShaderLevel = mVertexShaderLevel; @@ -711,6 +729,12 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) avatarp->renderRigid(); return; } + + if (pass == 3) + { + avatarp->renderSkinnedAttachments(); + return; + } if (sShaderLevel > 0) { |