From 4f7b5ff59f821dfcc62e73fc75753093200d7e97 Mon Sep 17 00:00:00 2001 From: Ray Date: Tue, 7 Mar 2023 20:40:45 +0100 Subject: [PATCH] `WARNING`: REMOVED: `UnloadModelKeepMeshes()` --- src/raylib.h | 1 - src/rmodels.c | 21 --------------------- 2 files changed, 22 deletions(-) diff --git a/src/raylib.h b/src/raylib.h index 9fcece6f0..a6c1a49d6 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -1440,7 +1440,6 @@ RLAPI Model LoadModel(const char *fileName); RLAPI Model LoadModelFromMesh(Mesh mesh); // Load model from generated mesh (default material) RLAPI bool IsModelReady(Model model); // Check if a model is ready RLAPI void UnloadModel(Model model); // Unload model (including meshes) from memory (RAM and/or VRAM) -RLAPI void UnloadModelKeepMeshes(Model model); // Unload model (but not meshes) from memory (RAM and/or VRAM) RLAPI BoundingBox GetModelBoundingBox(Model model); // Compute model bounding box limits (considers all meshes) // Model drawing functions diff --git a/src/rmodels.c b/src/rmodels.c index a2b5dd888..8ab923421 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -1147,27 +1147,6 @@ void UnloadModel(Model model) TRACELOG(LOG_INFO, "MODEL: Unloaded model (and meshes) from RAM and VRAM"); } -// Unload model (but not meshes) from memory (RAM and/or VRAM) -void UnloadModelKeepMeshes(Model model) -{ - // Unload materials maps - // NOTE: As the user could be sharing shaders and textures between models, - // we don't unload the material but just free its 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); - - // Unload arrays - RL_FREE(model.meshes); - RL_FREE(model.materials); - RL_FREE(model.meshMaterial); - - // Unload animation data - RL_FREE(model.bones); - RL_FREE(model.bindPose); - - TRACELOG(LOG_INFO, "MODEL: Unloaded model (but not meshes) from RAM and VRAM"); -} - // Compute model bounding box limits (considers all meshes) BoundingBox GetModelBoundingBox(Model model) {