Removed TABS

This commit is contained in:
Ray 2018-09-14 13:00:48 +02:00
parent 5b09630d45
commit 3a1a489545

View File

@ -2676,30 +2676,30 @@ static Mesh LoadGLTF(const char *fileName)
return mesh;
}
fseek(gltfFile, 0, SEEK_END);
int size = ftell(gltfFile);
fseek(gltfFile, 0, SEEK_SET);
fseek(gltfFile, 0, SEEK_END);
int size = ftell(gltfFile);
fseek(gltfFile, 0, SEEK_SET);
void *buffer = malloc(size);
fread(buffer, size, 1, gltfFile);
void *buffer = malloc(size);
fread(buffer, size, 1, gltfFile);
fclose(gltfFile);
fclose(gltfFile);
// GLTF data loading
cgltf_options options = {0};
cgltf_data data;
cgltf_result result = cgltf_parse(&options, buffer, size, &data);
cgltf_options options = {0};
cgltf_data data;
cgltf_result result = cgltf_parse(&options, buffer, size, &data);
if (result == cgltf_result_success)
{
printf("Type: %u\n", data.file_type);
printf("Version: %d\n", data.version);
printf("Meshes: %lu\n", data.meshes_count);
}
if (result == cgltf_result_success)
{
printf("Type: %u\n", data.file_type);
printf("Version: %d\n", data.version);
printf("Meshes: %lu\n", data.meshes_count);
}
else TraceLog(LOG_WARNING, "[%s] GLTF data could not be loaded", fileName);
free(buffer);
cgltf_free(&data);
free(buffer);
cgltf_free(&data);
return mesh;
}