diff options
author | Dave Parks <davep@lindenlab.com> | 2010-04-16 13:01:26 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2010-04-16 13:01:26 -0500 |
commit | 93e41033ae4f660bc9ac99d0115dcf2be042e420 (patch) | |
tree | bdfef642db34a8fb95a08a252bdc6996130d989c /indra/llrender/llvertexbuffer.cpp | |
parent | 14f3b77b9c4103f324d24625bd30dd106ab1817f (diff) | |
parent | 71b0a63c8df29d5d69b777306dcf6280fd98886a (diff) |
merge
Diffstat (limited to 'indra/llrender/llvertexbuffer.cpp')
-rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index d5b00f27a7..668e9e55f9 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -212,6 +212,27 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask) glClientActiveTextureARB(GL_TEXTURE0_ARB); } + if (sLastMask & MAP_WEIGHT4) + { + if (sWeight4Loc < 0) + { + llerrs << "Weighting disabled but vertex buffer still bound!" << llendl; + } + + if (!(data_mask & MAP_WEIGHT4)) + { //disable 4-component skin weight + glDisableVertexAttribArrayARB(sWeight4Loc); + } + } + else if (data_mask & MAP_WEIGHT4) + { + if (sWeight4Loc >= 0) + { //enable 4-component skin weight + glEnableVertexAttribArrayARB(sWeight4Loc); + } + } + + sLastMask = data_mask; } } |