summaryrefslogtreecommitdiff
path: root/src/models.c
diff options
context:
space:
mode:
authorjussi2023-11-03 23:12:55 +0200
committerjussi2023-11-03 23:12:55 +0200
commitd74a505d406faf276a265beaf8925d6e8ff9cec0 (patch)
tree72de6e187e0e745f21a9190f5d02895fcecaf83c /src/models.c
parente61823b8bb69e258370503df7969e4e3c2089e2d (diff)
downloadreilua-enhanced-d74a505d406faf276a265beaf8925d6e8ff9cec0.tar.gz
reilua-enhanced-d74a505d406faf276a265beaf8925d6e8ff9cec0.tar.bz2
reilua-enhanced-d74a505d406faf276a265beaf8925d6e8ff9cec0.zip
Compress/decompress and Encode/Decode DataBase64.
Diffstat (limited to 'src/models.c')
-rw-r--r--src/models.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/models.c b/src/models.c
index 64a8d3b..2db4b5b 100644
--- a/src/models.c
+++ b/src/models.c
@@ -6,6 +6,10 @@
#include "textures.h"
#include "core.h"
+void unloadMaterial( Material *material ) {
+ free( material->maps );
+}
+
// Unload model (but not meshes) from memory (RAM and/or VRAM)
void UnloadModelKeepMeshes( Model model ) {
// Unload materials maps
@@ -23,7 +27,7 @@ void UnloadModelKeepMeshes( Model model ) {
RL_FREE(model.bones);
RL_FREE(model.bindPose);
- TRACELOG(LOG_INFO, "MODEL: Unloaded model (but not meshes) from RAM and VRAM");
+ TraceLog( LOG_INFO, "MODEL: Unloaded model (but not meshes) from RAM and VRAM" );
}
void DrawBillboardProNoRatio( Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint ) {
@@ -1194,7 +1198,7 @@ int lmodelsUnloadMaterial( lua_State *L ) {
Material *material = uluaGetMaterial( L, 1 );
/* Custom UnloadMaterial since we don't want to free Shaders or Textures. */
- RL_FREE( material->maps );
+ unloadMaterial( material );
// UnloadMaterial( *material );