only loading one's model data to the GPU once

This commit is contained in:
devZoGok
2025-06-15 18:41:52 +03:00
parent 6f7702cb19
commit 08907567b0
8 changed files with 150 additions and 125 deletions
+18 -1
View File
@@ -190,7 +190,24 @@ namespace vb01{
const char *fullSkeletonName = meshEl->Attribute("skeleton");
string name = string(meshEl->Parent()->ToElement()->Attribute("name")) + string(meshEl->Attribute("name"));
Mesh *mesh = new Mesh(MeshData(vertPos, weights, boneIndices, shapeKeyOffsets, numVertPos, normals, vertices, indices, numVertices / 3, name, vertexGroups, numVertexGroups, (fullSkeletonName ? fullSkeletonName : ""), shapeKeys, numShapeKeys));
MeshData meshData = MeshData(
vertPos,
weights,
boneIndices,
shapeKeyOffsets,
numVertPos,
normals,
vertices,
indices,
numVertices / 3,
name,
vertexGroups,
numVertexGroups,
(fullSkeletonName ? fullSkeletonName : ""),
shapeKeys,
numShapeKeys
);
Mesh *mesh = new Mesh(meshData);
return mesh;
}