diff options
| author | Ray <[email protected]> | 2023-10-09 09:53:52 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2023-10-09 09:53:52 +0200 |
| commit | 33c84b3c0092982aa3472e94a766f6bf711a31b9 (patch) | |
| tree | 5acb6d5153fa6fff0227fe3d29290ee2c1bfb44f /src | |
| parent | 7ab911b9a4fb0ba3798bb8f117e69475a4fb89bc (diff) | |
| download | raylib-33c84b3c0092982aa3472e94a766f6bf711a31b9.tar.gz raylib-33c84b3c0092982aa3472e94a766f6bf711a31b9.zip | |
Update rmodels.c
Diffstat (limited to 'src')
| -rw-r--r-- | src/rmodels.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/rmodels.c b/src/rmodels.c index 77c89b6e..0809fce8 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -5614,12 +5614,13 @@ static Model LoadM3D(const char *fileName) // We always need a default material, so we add +1 model.materialCount++; - // Faces must be in non-decreasing materialid order - // Verify that quickly, sorting them otherwise. + // Faces must be in non-decreasing materialid order. Verify that quickly, sorting them otherwise. + // WARNING: Sorting is not needed, valid M3D model files should already be sorted + // Just keeping the sorting function for reference (Check PR #3363 #3385) + /* for (i = 1; i < m3d->numface; i++) { - if ( m3d->face[i-1].materialid <= m3d->face[i].materialid ) - continue; + if (m3d->face[i-1].materialid <= m3d->face[i].materialid) continue; // face[i-1] > face[i]. slide face[i] lower. m3df_t slider = m3d->face[i]; @@ -5634,6 +5635,7 @@ static Model LoadM3D(const char *fileName) m3d->face[j+1] = slider; } + */ model.meshes = (Mesh *)RL_CALLOC(model.meshCount, sizeof(Mesh)); model.meshMaterial = (int *)RL_CALLOC(model.meshCount, sizeof(int)); |
