From 45e11be96a7503a0cfe29bbbcc8d885d81ab9591 Mon Sep 17 00:00:00 2001 From: jussi Date: Wed, 25 Sep 2024 20:54:32 +0300 Subject: UnloadMaterial can also optionally free textures and shader. --- ReiLua_API.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'ReiLua_API.lua') diff --git a/ReiLua_API.lua b/ReiLua_API.lua index 740729b..383386d 100644 --- a/ReiLua_API.lua +++ b/ReiLua_API.lua @@ -944,7 +944,7 @@ RL.RL_MAX_SHADER_LOCATIONS=32 ---Default projection matrix near cull distance RL.RL_CULL_DISTANCE_NEAR=0.01 ---Default projection matrix far cull distance -RL.RL_CULL_DISTANCE_FAR=1000.0 +RL.RL_CULL_DISTANCE_FAR=1000 -- Defines - RLGL Texture parameters @@ -4557,7 +4557,7 @@ function RL.LoadModelFromMesh( mesh ) end ---@return any isReady function RL.IsModelReady( model ) end ----Unload model (including meshes) from memory (RAM and/or VRAM) +---Unload model (meshes/materials) from memory (RAM and/or VRAM) ---@param model any ---@return any RL.UnloadModel function RL.UnloadModel( model ) end @@ -4936,10 +4936,11 @@ function RL.CreateMaterial( materialData ) end ---@return any isReady function RL.IsMaterialReady( material ) end ----Unload material from GPU memory (VRAM) +---Unload material from GPU memory (VRAM). Note! Use freeAll to unload shaders and textures ---@param material any +---@param freeAll boolean ---@return any RL.UnloadMaterial -function RL.UnloadMaterial( material ) end +function RL.UnloadMaterial( material, freeAll ) end ---Set texture for a material map type (MATERIAL_MAP_ALBEDO, MATERIAL_MAP_METALNESS...) ---@param material any -- cgit v1.2.3