diff options
| author | Ray <[email protected]> | 2022-06-07 10:04:24 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2022-06-07 10:04:24 +0200 |
| commit | bf208decc0b32e9e679316fff8b6cb9d5b8971f5 (patch) | |
| tree | 20fe28466bed0e780af839b56ac16e0197b436f9 /src/rmodels.c | |
| parent | 06db2767fea3ca7151d64d5cb6cf2544a39a78b4 (diff) | |
| download | raylib-bf208decc0b32e9e679316fff8b6cb9d5b8971f5.tar.gz raylib-bf208decc0b32e9e679316fff8b6cb9d5b8971f5.zip | |
REVIEWED: Compilation warnings
Diffstat (limited to 'src/rmodels.c')
| -rw-r--r-- | src/rmodels.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rmodels.c b/src/rmodels.c index 97fa3908..af7e0cd7 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -4844,7 +4844,7 @@ static Model LoadGLTF(const char *fileName) LOAD_ATTRIBUTE(attribute, 4, unsigned short, temp); // Convert data to raylib color data type (4 bytes) - for (int c = 0; c < attribute->count*4; c++) model.meshes[meshIndex].colors[c] = (unsigned char)(((float)temp[c]/65535.0f)*255.0f); + for (unsigned int c = 0; c < attribute->count*4; c++) model.meshes[meshIndex].colors[c] = (unsigned char)(((float)temp[c]/65535.0f)*255.0f); RL_FREE(temp); } @@ -4858,7 +4858,7 @@ static Model LoadGLTF(const char *fileName) LOAD_ATTRIBUTE(attribute, 4, float, temp); // Convert data to raylib color data type (4 bytes), we expect the color data normalized - for (int c = 0; c < attribute->count*4; c++) model.meshes[meshIndex].colors[c] = (unsigned char)(temp[c]*255.0f); + for (unsigned int c = 0; c < attribute->count*4; c++) model.meshes[meshIndex].colors[c] = (unsigned char)(temp[c]*255.0f); RL_FREE(temp); } @@ -4893,7 +4893,7 @@ static Model LoadGLTF(const char *fileName) LOAD_ATTRIBUTE(attribute, 1, unsigned int, temp); // Convert data to raylib indices data type (unsigned short) - for (int d = 0; d < attribute->count; d++) model.meshes[meshIndex].indices[d] = (unsigned short)temp[d]; + for (unsigned int d = 0; d < attribute->count; d++) model.meshes[meshIndex].indices[d] = (unsigned short)temp[d]; TRACELOG(LOG_WARNING, "MODEL: [%s] Indices data converted from u32 to u16, possible loss of data", fileName); @@ -4905,7 +4905,7 @@ static Model LoadGLTF(const char *fileName) // Assign to the primitive mesh the corresponding material index // NOTE: If no material defined, mesh uses the already assigned default material (index: 0) - for (int m = 0; m < data->materials_count; m++) + for (unsigned int m = 0; m < data->materials_count; m++) { // The primitive actually keeps the pointer to the corresponding material, // raylib instead assigns to the mesh the by its index, as loaded in model.materials array |
