Review PR formatting
This commit is contained in:
parent
314c4061df
commit
741afde3bc
1 changed files with 3 additions and 7 deletions
10
src/models.c
10
src/models.c
|
@ -669,9 +669,7 @@ Model LoadModel(const char *fileName)
|
||||||
model.materials = (Material *)RL_CALLOC(model.materialCount, sizeof(Material));
|
model.materials = (Material *)RL_CALLOC(model.materialCount, sizeof(Material));
|
||||||
model.materials[0] = LoadMaterialDefault();
|
model.materials[0] = LoadMaterialDefault();
|
||||||
|
|
||||||
if (model.meshMaterial==NULL) {
|
if (model.meshMaterial == NULL) model.meshMaterial = (int *)RL_CALLOC(model.meshCount, sizeof(int));
|
||||||
model.meshMaterial = (int *)RL_CALLOC(model.meshCount, sizeof(int));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return model;
|
return model;
|
||||||
|
@ -2863,10 +2861,8 @@ static Model LoadOBJ(const char *fileName)
|
||||||
// Assign mesh material for current mesh
|
// Assign mesh material for current mesh
|
||||||
model.meshMaterial[m] = attrib.material_ids[m];
|
model.meshMaterial[m] = attrib.material_ids[m];
|
||||||
|
|
||||||
// set unfound materials to default
|
// Set unfound materials to default
|
||||||
if (model.meshMaterial[m] == -1) {
|
if (model.meshMaterial[m] == -1) model.meshMaterial[m] = 0;
|
||||||
model.meshMaterial[m] = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init model materials
|
// Init model materials
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue