Reviewed comment
This commit is contained in:
parent
2d5cc5ddbf
commit
3ebc55fdfe
1 changed files with 3 additions and 4 deletions
|
@ -704,10 +704,9 @@ void UnloadModel(Model model)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < model.meshCount; i++) UnloadMesh(model.meshes[i]);
|
for (int i = 0; i < model.meshCount; i++) UnloadMesh(model.meshes[i]);
|
||||||
|
|
||||||
// as the user could be sharing shaders and textures between
|
// As the user could be sharing shaders and textures between models,
|
||||||
// models, don't unload the material but free it's maps instead
|
// we don't unload the material but just free it's maps, the user
|
||||||
// the user is responsible for freeing models shaders and textures
|
// is responsible for freeing models shaders and textures
|
||||||
//for (int i = 0; i < model.materialCount; i++) UnloadMaterial(model.materials[i]);
|
|
||||||
for (int i = 0; i < model.materialCount; i++) RL_FREE(model.materials[i].maps);
|
for (int i = 0; i < model.materialCount; i++) RL_FREE(model.materials[i].maps);
|
||||||
|
|
||||||
RL_FREE(model.meshes);
|
RL_FREE(model.meshes);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue