Removed TABS
This commit is contained in:
parent
5b09630d45
commit
3a1a489545
1 changed files with 19 additions and 19 deletions
34
src/models.c
34
src/models.c
|
@ -2676,30 +2676,30 @@ static Mesh LoadGLTF(const char *fileName)
|
||||||
return mesh;
|
return mesh;
|
||||||
}
|
}
|
||||||
|
|
||||||
fseek(gltfFile, 0, SEEK_END);
|
fseek(gltfFile, 0, SEEK_END);
|
||||||
int size = ftell(gltfFile);
|
int size = ftell(gltfFile);
|
||||||
fseek(gltfFile, 0, SEEK_SET);
|
fseek(gltfFile, 0, SEEK_SET);
|
||||||
|
|
||||||
void *buffer = malloc(size);
|
void *buffer = malloc(size);
|
||||||
fread(buffer, size, 1, gltfFile);
|
fread(buffer, size, 1, gltfFile);
|
||||||
|
|
||||||
fclose(gltfFile);
|
fclose(gltfFile);
|
||||||
|
|
||||||
// GLTF data loading
|
// GLTF data loading
|
||||||
cgltf_options options = {0};
|
cgltf_options options = {0};
|
||||||
cgltf_data data;
|
cgltf_data data;
|
||||||
cgltf_result result = cgltf_parse(&options, buffer, size, &data);
|
cgltf_result result = cgltf_parse(&options, buffer, size, &data);
|
||||||
|
|
||||||
if (result == cgltf_result_success)
|
if (result == cgltf_result_success)
|
||||||
{
|
{
|
||||||
printf("Type: %u\n", data.file_type);
|
printf("Type: %u\n", data.file_type);
|
||||||
printf("Version: %d\n", data.version);
|
printf("Version: %d\n", data.version);
|
||||||
printf("Meshes: %lu\n", data.meshes_count);
|
printf("Meshes: %lu\n", data.meshes_count);
|
||||||
}
|
}
|
||||||
else TraceLog(LOG_WARNING, "[%s] GLTF data could not be loaded", fileName);
|
else TraceLog(LOG_WARNING, "[%s] GLTF data could not be loaded", fileName);
|
||||||
|
|
||||||
free(buffer);
|
free(buffer);
|
||||||
cgltf_free(&data);
|
cgltf_free(&data);
|
||||||
|
|
||||||
return mesh;
|
return mesh;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue