diff --git a/examples/models/magicavoxel_loader.h b/examples/models/magicavoxel_loader.h index df7743875..ef883c682 100644 --- a/examples/models/magicavoxel_loader.h +++ b/examples/models/magicavoxel_loader.h @@ -746,12 +746,12 @@ Model Vox_LoadFileName(const char* pszfileName) pmesh->vertices = MemAlloc(size); memcpy(pmesh->vertices, pvertices, size); - //Copy Indices + //Copy Indices TODO compute globals indices array size = pvoxArray->indices.used * sizeof(unsigned short); pmesh->indices = MemAlloc(size); memcpy(pmesh->indices, pindices, size); - pmesh->triangleCount = pvoxArray->indices.used / 3; + pmesh->triangleCount = (pmesh->vertexCount / 4) * 2; // Copy Colors size = pmesh->vertexCount * sizeof(Color); @@ -780,4 +780,4 @@ Model Vox_LoadFileName(const char* pszfileName) } -#endif MAGICAVOXEL_LOADER_IMPLEMENTATION +#endif //MAGICAVOXEL_LOADER_IMPLEMENTATION diff --git a/examples/models/models_magicavoxel_loading.c b/examples/models/models_magicavoxel_loading.c index bf5760a32..523ed7dd9 100644 --- a/examples/models/models_magicavoxel_loading.c +++ b/examples/models/models_magicavoxel_loading.c @@ -23,10 +23,10 @@ #define NUM_VOX_FILES 3 -char* szVoxFiles[] = { - "..\\..\\examples\\models\\resources\\vox\\chr_knight.vox", - "..\\..\\examples\\models\\resources\\vox\\chr_sword.vox", - "..\\..\\examples\\models\\resources\\vox\\monu9.vox" +const char* szVoxFiles[] = { + "resources/vox/chr_knight.vox", + "resources/vox/chr_sword.vox", + "resources/vox/monu9.vox" };