From 9b70b1056526d41c0aa7042523d39895f72be1c6 Mon Sep 17 00:00:00 2001 From: surkeh Date: Thu, 19 Apr 2018 14:48:32 -0700 Subject: [PATCH] writemesh() variable previousBatch renamed to endOfPrevious --- demo/extractmesh.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/demo/extractmesh.c b/demo/extractmesh.c index 4ee0243..7126d2d 100644 --- a/demo/extractmesh.c +++ b/demo/extractmesh.c @@ -25,22 +25,22 @@ void writemesh(const struct MeshHeader *mh, // batch data the same treatment. struct BatchData * newBatches = malloc(newmh.numBatch * sizeof(struct BatchData)); - uint64_t previousBatch = 0; + uint64_t endOfPrevious = 0; for (int i = 0; i < newmh.numBatch; i++) { newBatches[i] = (m -> b) -> bd[i]; unsigned int nVertices = m -> b -> bd[i].numVertex; - if (previousBatch == 0) { + if (endOfPrevious == 0) { newBatches[i].offsetPositions = newmh.offsetBatches + ( newmh.numBatch * sizeof(struct BatchData)); } else { - newBatches[i].offsetPositions = previousBatch; + newBatches[i].offsetPositions = endOfPrevious; } newBatches[i].offsetNormals = newBatches[i].offsetPositions + (sizeof(struct Coordinate) * nVertices); newBatches[i].offsetUVs = newBatches[i].offsetNormals + (sizeof(struct Coordinate) * nVertices); newBatches[i].offsetBoneIndexes = newBatches[i].offsetUVs + (sizeof(struct UVs) * nVertices); newBatches[i].offsetBoneWeights = newBatches[i].offsetBoneIndexes + (sizeof(struct BoneIndexes) * nVertices); append(fn, (char*)(&newBatches[i]), sizeof(struct BatchData)); - previousBatch = newBatches[i].offsetBoneWeights + (sizeof(struct BoneWeights) * nVertices);; + endOfPrevious = newBatches[i].offsetBoneWeights + (sizeof(struct BoneWeights) * nVertices);; } for (int i = 0; i < newmh.numBatch; i++) {