fix models_magicavoxel_loading example for linux.

This commit is contained in:
fxgen 2021-08-22 18:50:14 +02:00
parent 95b1112ecd
commit f0634e28cc
2 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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"
};