diff options
| author | jussi | 2025-06-11 17:00:25 +0300 |
|---|---|---|
| committer | jussi | 2025-06-11 17:00:25 +0300 |
| commit | a38e76873b5ca3080c8046ae4759866d8cccc4e5 (patch) | |
| tree | ca3b5b8d0ec66b3d9c64f46b6b7d5db4e481658a /examples/lightmap | |
| parent | 5b8af05e96b33f2d032cc31a329b89e1231d5502 (diff) | |
| download | reilua-enhanced-a38e76873b5ca3080c8046ae4759866d8cccc4e5.tar.gz reilua-enhanced-a38e76873b5ca3080c8046ae4759866d8cccc4e5.tar.bz2 reilua-enhanced-a38e76873b5ca3080c8046ae4759866d8cccc4e5.zip | |
uluaGet* pops lua stack correctly when userdata given in table.
Diffstat (limited to 'examples/lightmap')
| -rw-r--r-- | examples/lightmap/main.lua | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/examples/lightmap/main.lua b/examples/lightmap/main.lua index 20a2729..d7b576d 100644 --- a/examples/lightmap/main.lua +++ b/examples/lightmap/main.lua @@ -25,6 +25,7 @@ function RL.init() RL.SetWindowState( RL.FLAG_WINDOW_RESIZABLE ) RL.SetWindowState( RL.FLAG_VSYNC_HINT ) RL.SetWindowPosition( { mPos[1] + mSize[1] / 2 - winSize[1] / 2, mPos[2] + mSize[2] / 2 - winSize[2] / 2 } ) + RL.SetGCUnload( false ) camera = Cam3D:new() camera:setPosition( { 0, 8, 16 } ) @@ -48,9 +49,9 @@ function RL.init() tileTexture = RL.LoadTexture( RL.GetBasePath().."../resources/images/tile.png" ) RL.GenTextureMipmaps( tileTexture ) - RL.SetTextureFilter( tileTexture, RL.TEXTURE_FILTER_TRILINEAR ) + RL.SetTextureFilter( tileTexture, RL.TEXTURE_FILTER_BILINEAR ) lightmap = RL.LoadTexture( RL.GetBasePath().."../resources/images/lightmap.png" ) - RL.SetTextureFilter( lightmap, RL.TEXTURE_FILTER_TRILINEAR ) + RL.SetTextureFilter( lightmap, RL.TEXTURE_FILTER_BILINEAR ) shader = RL.LoadShader( RL.GetBasePath().."../resources/shaders/glsl"..GLSL_VERSION.."/lightmap.vs", RL.GetBasePath().."../resources/shaders/glsl"..GLSL_VERSION.."/lightmap.fs" ) @@ -99,3 +100,8 @@ function RL.draw() RL.DrawMesh( mesh, material, matrix ) camera:endMode3D() end + +function RL.exit() + RL.UnloadMaterial( material, true ) + RL.UnloadMesh( mesh ) +end |
