瀏覽代碼

Reviewed comment

pull/937/head
raysan5 5 年之前
父節點
當前提交
3ebc55fdfe
共有 1 個文件被更改,包括 3 次插入4 次删除
  1. +3
    -4
      src/models.c

+ 3
- 4
src/models.c 查看文件

@ -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
// models, don't unload the material but free it's maps instead
// the user is responsible for freeing models shaders and textures
//for (int i = 0; i < model.materialCount; i++) UnloadMaterial(model.materials[i]);
// As the user could be sharing shaders and textures between models,
// we don't unload the material but just free it's maps, the user
// is responsible for freeing models shaders and textures
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…
取消
儲存