diff options
author | Aura Linden <aura@lindenlab.com> | 2015-10-08 15:18:48 -0700 |
---|---|---|
committer | Aura Linden <aura@lindenlab.com> | 2015-10-08 15:18:48 -0700 |
commit | b082ed28e8936fa378160be3076393f295c26c1b (patch) | |
tree | 6dfd40478bbcf0a03e4be12d3d17c73ad161d7d2 /indra/newview/llfloatermodelpreview.cpp | |
parent | d038ed07f0978aa9f43e488bd525987d20543d1c (diff) | |
parent | 5b58bfb937f7f996c7f1b97f15b1c837aa23a463 (diff) |
Pulled merge from Vir's Bento.
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rwxr-xr-x | indra/newview/llfloatermodelpreview.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 18a2729398..4267d6371e 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -4028,16 +4028,17 @@ BOOL LLModelPreview::render() LLMatrix4a mat[LL_MAX_JOINTS_PER_MESH_OBJECT]; const LLMeshSkinInfo *skin = &model->mSkinInfo; - U32 count = llmin((U32) skin->mJointNames.size(), (U32) LL_MAX_JOINTS_PER_MESH_OBJECT); + U32 count = LLDrawPoolAvatar::getMeshJointCount(skin); LLDrawPoolAvatar::initSkinningMatrixPalette((LLMatrix4*)mat, count, skin, getPreviewAvatar()); LLMatrix4a bind_shape_matrix; bind_shape_matrix.loadu(skin->mBindShapeMatrix); + U32 max_joints = LLDrawPoolAvatar::getMaxJointCount(); for (U32 j = 0; j < buffer->getNumVerts(); ++j) { LLMatrix4a final_mat; F32 *wptr = weight[j].mV; - LLDrawPoolAvatar::getPerVertexSkinMatrix(wptr, mat, true, final_mat); + LLDrawPoolAvatar::getPerVertexSkinMatrix(wptr, mat, true, final_mat, max_joints); //VECTORIZE THIS LLVector4a& v = face.mPositions[j]; |