diff options
| author | jussi | 2023-10-30 22:40:20 +0200 |
|---|---|---|
| committer | jussi | 2023-10-30 22:40:20 +0200 |
| commit | c3295e014d979c0213b3fb7e4837b5356bc8fdb4 (patch) | |
| tree | 66ee22c7140761a17bf174d71fecfb94c1378b1d /examples/lightmap/main.lua | |
| parent | 6e0d577d63b221797cdc7f392718dd1c4fb384b4 (diff) | |
| download | reilua-enhanced-c3295e014d979c0213b3fb7e4837b5356bc8fdb4.tar.gz reilua-enhanced-c3295e014d979c0213b3fb7e4837b5356bc8fdb4.tar.bz2 reilua-enhanced-c3295e014d979c0213b3fb7e4837b5356bc8fdb4.zip | |
Reintroducing Unload functions. Is*Ready functions. GC_UNLOAD setting and check function.
Diffstat (limited to 'examples/lightmap/main.lua')
| -rw-r--r-- | examples/lightmap/main.lua | 24 |
1 files changed, 6 insertions, 18 deletions
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 |
