summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2023-03-07 20:40:45 +0100
committerRay <[email protected]>2023-03-07 20:40:45 +0100
commit4f7b5ff59f821dfcc62e73fc75753093200d7e97 (patch)
treed6a5f8325ceebbd2ba0802ccd6094a1c2399c3f0 /src
parentab1e246367973c4d2ef74843a5f9588010889466 (diff)
downloadraylib-4f7b5ff59f821dfcc62e73fc75753093200d7e97.tar.gz
raylib-4f7b5ff59f821dfcc62e73fc75753093200d7e97.zip
`WARNING`: REMOVED: `UnloadModelKeepMeshes()`
Diffstat (limited to 'src')
-rw-r--r--src/raylib.h1
-rw-r--r--src/rmodels.c21
2 files changed, 0 insertions, 22 deletions
diff --git a/src/raylib.h b/src/raylib.h
index 9fcece6f..a6c1a49d 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 a2b5dd88..8ab92342 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)
{