diff options
author | Dave Parks <davep@lindenlab.com> | 2012-12-07 17:00:01 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2012-12-07 17:00:01 -0600 |
commit | 36a7b0914dc530874798decb3960949573a96012 (patch) | |
tree | a98b28b1b24f6a7564d2a20c34c9c688c9c680c7 | |
parent | 0a8e7377e74ab5c35d14a7e3cc43775fb3ed97cb (diff) |
MAINT-2053 Fix for garbangles on rigged attachments.
-rw-r--r-- | indra/newview/lldrawpoolavatar.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 49e26aacd9..38268b102b 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -134,6 +134,16 @@ void LLDrawPoolAvatar::prerender() { sBufferUsage = GL_STREAM_DRAW_ARB; } + + if (!mDrawFace.empty()) + { + const LLFace *facep = mDrawFace[0]; + if (facep && facep->getDrawable()) + { + LLVOAvatar* avatarp = (LLVOAvatar *)facep->getDrawable()->getVObj().get(); + updateRiggedVertexBuffers(avatarp); + } + } } LLMatrix4& LLDrawPoolAvatar::getModelView() @@ -1557,7 +1567,6 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) void LLDrawPoolAvatar::renderDeferredRiggedSimple(LLVOAvatar* avatar) { - updateRiggedVertexBuffers(avatar); renderRigged(avatar, RIGGED_DEFERRED_SIMPLE); } @@ -1621,7 +1630,6 @@ void LLDrawPoolAvatar::updateRiggedVertexBuffers(LLVOAvatar* avatar) void LLDrawPoolAvatar::renderRiggedSimple(LLVOAvatar* avatar) { - updateRiggedVertexBuffers(avatar); renderRigged(avatar, RIGGED_SIMPLE); } |