Changing vertex data interfaces

This commit is contained in:
Dynamitos
2024-06-25 08:59:09 +02:00
parent bd63b14260
commit c352555b0b
11 changed files with 131 additions and 158 deletions
+3 -2
View File
@@ -294,8 +294,9 @@ void VertexData::commitMeshes() {
MeshId VertexData::allocateVertexData(uint64 numVertices) {
std::unique_lock l(vertexDataLock);
MeshId res{idCounter++};
meshOffsets[res] = head;
meshVertexCounts[res] = numVertices;
meshOffsets.add(head);
meshVertexCounts.add(numVertices);
meshData.add({});
head += numVertices;
if (head > verticesAllocated) {
verticesAllocated = std::max(head, verticesAllocated + NUM_DEFAULT_ELEMENTS);