Fixed bug where meshes added to the mesh library will not have correct corresponding "null" vertex bone weights and indices

This commit is contained in:
Kah Wei 2022-12-16 21:43:33 +08:00
parent 12a46c4266
commit 51479d2bd0
1 changed files with 8 additions and 0 deletions

View File

@ -171,6 +171,10 @@ namespace SHADE
addJob.VertexBoneIndices, addJob.VertexBoneIndices + addJob.VertexCount * SHMesh::BONE_INDICES_PER_VERTEX
);
}
else
{
vertBoneIdxStorage.resize(vertBoneIdxStorage.size() + addJob.VertexCount * SHMesh::BONE_INDICES_PER_VERTEX);
}
if (addJob.VertexBoneWeights)
{
vertBoneWeightStorage.insert
@ -179,6 +183,10 @@ namespace SHADE
addJob.VertexBoneWeights, addJob.VertexBoneWeights + addJob.VertexCount
);
}
else
{
vertBoneWeightStorage.resize(vertBoneWeightStorage.size() + addJob.VertexCount);
}
indexStorage.insert
(
indexStorage.end(),