From c3295e014d979c0213b3fb7e4837b5356bc8fdb4 Mon Sep 17 00:00:00 2001 From: jussi Date: Mon, 30 Oct 2023 22:40:20 +0200 Subject: Reintroducing Unload functions. Is*Ready functions. GC_UNLOAD setting and check function. --- examples/lightmap/main.lua | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) (limited to 'examples/lightmap/main.lua') diff --git a/examples/lightmap/main.lua b/examples/lightmap/main.lua index 6d946a5..56b6772 100644 --- a/examples/lightmap/main.lua +++ b/examples/lightmap/main.lua @@ -5,12 +5,12 @@ Cam3D = require( "camera3d" ) local PLANE_SIZE = 8 local monitor = 0 -local camera = -1 -local tileTexture = -1 -local mesh = -1 -local material = -1 -local lightmap = -1 -local shader = -1 +local camera = {} +local tileTexture = nil +local mesh = nil +local material = nil +local lightmap = nil +local shader = nil local matrix = {} @@ -80,8 +80,6 @@ function RL.init() } material = RL.CreateMaterial( materialData ) - print( "material", material ) - matrix = RL.MatrixMultiply( RL.MatrixIdentity(), RL.MatrixTranslate( { -4, 0, -4 } ) ) end @@ -99,18 +97,8 @@ end function RL.draw() RL.ClearBackground( { 25, 50, 50 } ) - -- RL.UpdateCamera3D( camera, RL.CAMERA_ORBITAL ) - -- RL.UpdateCamera3D( camera, RL.CAMERA_FREE ) - -- RL.UpdateCamera3D( camera, RL.CAMERA_FIRST_PERSON ) camera:beginMode3D() RL.DrawMesh( mesh, material, matrix ) camera:endMode3D() end - -function RL.exit() - material = nil - collectgarbage( "collect" ) - tileTexture = nil - collectgarbage( "collect" ) -end \ No newline at end of file -- cgit v1.2.3