Fixed clang compilation

This commit is contained in:
Deve 2016-12-24 02:07:53 +01:00
parent 26bbffe8b0
commit 6486d1548b
2 changed files with 10 additions and 3 deletions

View File

@ -1410,6 +1410,12 @@ void CSkinnedMesh::addJoints(core::array<IBoneSceneNode*> &jointChildSceneNodes,
SkinnedLastFrame=false;
}
bool CSkinnedMesh::sortJointInfluenceFunc(const JointInfluence& a,
const JointInfluence& b)
{
return a.weight > b.weight;
}
void CSkinnedMesh::convertForSkinning()
{
if (HardwareSkinning) return;
@ -1440,9 +1446,7 @@ void CSkinnedMesh::convertForSkinning()
{
core::array<JointInfluence> this_influence;
core::array<JointInfluence> reported_weight = wi[b][i];
reported_weight.sort([]
(const JointInfluence& a, const JointInfluence& b)
{ return a.weight > b.weight; });
reported_weight.sort(sortJointInfluenceFunc);
float remaining_weight = 1.0f;
for (u32 j = 0; j < 4; j++)
{

View File

@ -201,6 +201,9 @@ private:
core::vector3df& vt1, core::vector3df& vt2, core::vector3df& vt3,
core::vector2df& tc1, core::vector2df& tc2, core::vector2df& tc3);
static bool sortJointInfluenceFunc(const JointInfluence& a,
const JointInfluence& b);
core::array<SSkinMeshBuffer*> *SkinningBuffers; //Meshbuffer to skin, default is to skin localBuffers
core::array<SSkinMeshBuffer*> LocalBuffers;