diff options
author | Graham Linden <graham@lindenlab.com> | 2019-02-08 12:43:27 -0800 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-02-08 12:43:27 -0800 |
commit | c909e496fd1a0710e5349441ef4e3cae5ff98de6 (patch) | |
tree | 0da6c0017d6ec17e2d7f2d44e1a9d270d57e7344 /indra/newview | |
parent | 90f9078d1f931774b5a6e866e26f4e0294f1e2d1 (diff) |
SL-10501
Remove assert and replace with warning when rigged mesh tries to use tex anim on tex index > 1.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/lldrawpoolavatar.cpp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 9fa76c0d97..3e1d78e6df 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1999,16 +1999,24 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) if (face->mTextureMatrix && vobj->mTexAnimMode) { - // we don't support tex matrix ops on anything but texture_matrix0 and texture_matrix1 - // if you hit this assert, you most likely need to fix your content - llassert(gGL.getCurrentTexUnitIndex() <= 1); + U32 tex_index = gGL.getCurrentTexUnitIndex(); + if (tex_index <= 1) + { + gGL.matrixMode(LLRender::MM_TEXTURE); + gGL.loadMatrix((F32*) face->mTextureMatrix->mMatrix); + } + else + { + LL_WARNS_ONCE("render") << "Cannot use tex anim of tex index " << tex_index << " ignoring!" << LL_ENDL; + } - gGL.matrixMode(LLRender::MM_TEXTURE); - gGL.loadMatrix((F32*) face->mTextureMatrix->mMatrix); buff->setBuffer(data_mask); buff->drawRange(LLRender::TRIANGLES, start, end, count, offset); - gGL.loadIdentity(); - + + if (tex_index <= 1) + { + gGL.loadIdentity(); + } } else { |