summaryrefslogtreecommitdiff
path: root/examples/lightmap
diff options
context:
space:
mode:
authorjussi2023-10-29 13:21:42 +0200
committerjussi2023-10-29 13:21:42 +0200
commit76911d45a879838047b2845cd6124e9ca3af083a (patch)
tree2ff82956451818faaa8956fa2af543fc32646a03 /examples/lightmap
parentfd49d806cf1f54fb86c3ed7b9db499f473a3ef1d (diff)
downloadreilua-enhanced-76911d45a879838047b2845cd6124e9ca3af083a.tar.gz
reilua-enhanced-76911d45a879838047b2845cd6124e9ca3af083a.tar.bz2
reilua-enhanced-76911d45a879838047b2845cd6124e9ca3af083a.zip
New object types for all types.
Diffstat (limited to 'examples/lightmap')
-rw-r--r--examples/lightmap/main.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/lightmap/main.lua b/examples/lightmap/main.lua
index 11cd632..6d946a5 100644
--- a/examples/lightmap/main.lua
+++ b/examples/lightmap/main.lua
@@ -55,6 +55,8 @@ function RL.init()
shader = RL.LoadShader( RL.GetBasePath().."../resources/shaders/glsl330/lightmap.vs",
RL.GetBasePath().."../resources/shaders/glsl330/lightmap.fs" )
+ print( "shader", shader )
+
local materialData = {
shader = shader,
maps = {
@@ -77,6 +79,9 @@ function RL.init()
},
}
material = RL.CreateMaterial( materialData )
+
+ print( "material", material )
+
matrix = RL.MatrixMultiply( RL.MatrixIdentity(), RL.MatrixTranslate( { -4, 0, -4 } ) )
end
@@ -102,3 +107,10 @@ function RL.draw()
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