mirror of
https://notabug.org/scuti/lib3ddevil1
synced 2025-05-31 14:11:42 +05:30
Fixed iterating bug with initializing mesh batches
This commit is contained in:
10
test/main.c
10
test/main.c
@@ -113,18 +113,18 @@ void extractmeshes(const char *filedata,
|
||||
}
|
||||
struct Header *h = (struct Header*)filedata;
|
||||
struct MeshHeader *mh = NULL;
|
||||
struct Batch *b = NULL;
|
||||
struct Batch b;
|
||||
unsigned int i;
|
||||
unsigned int j;
|
||||
bool ok;
|
||||
//h -> numMesh
|
||||
for (i = 0; i < 2; i++) {
|
||||
for (i = 0; i < h -> numMesh; i++) {
|
||||
ok = getmeshheader(&mh, i, filedata);
|
||||
if (ok) {
|
||||
for (j = 0; j < mh -> numBatch; j++) {
|
||||
// for (j = 0; j < mh -> numBatch; j++) {
|
||||
getmeshbatch(&b, mh, filedata);
|
||||
printmeshbatch(b);
|
||||
} // end for
|
||||
printmeshbatch(&b);
|
||||
// } // end for
|
||||
} // end if
|
||||
} // end for
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user