summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermodelpreview.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2015-10-07 15:38:40 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2015-10-07 15:38:40 -0400
commit74b8a487646cccb3260d02910ab5b16e274ec9ab (patch)
treeb23fe3a169612535095e34fb5391323cc2e3bace /indra/newview/llfloatermodelpreview.cpp
parent4588616d0d57e744ec741ed17299c1c052d2bb55 (diff)
SL-234 WIP - adjust max mesh object joints at run-time, including rebuilding shaders
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp5
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];