summaryrefslogtreecommitdiff
path: root/examples/2D_lights/main.lua
diff options
context:
space:
mode:
authorjussi2024-11-21 23:25:28 +0200
committerjussi2024-11-21 23:25:28 +0200
commitc9ebe23d6282e96b410dc7687e0be1c4f3ba1b4d (patch)
treedfd26a87fb2b2f702f77728b98a1e6c193684631 /examples/2D_lights/main.lua
parentd96e33bb1772c28f630de32e09201c0cdea6f896 (diff)
downloadreilua-enhanced-c9ebe23d6282e96b410dc7687e0be1c4f3ba1b4d.tar.gz
reilua-enhanced-c9ebe23d6282e96b410dc7687e0be1c4f3ba1b4d.tar.bz2
reilua-enhanced-c9ebe23d6282e96b410dc7687e0be1c4f3ba1b4d.zip
RL.config and InitWindow.
Diffstat (limited to 'examples/2D_lights/main.lua')
-rw-r--r--examples/2D_lights/main.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/2D_lights/main.lua b/examples/2D_lights/main.lua
index 35ea7bf..7a82543 100644
--- a/examples/2D_lights/main.lua
+++ b/examples/2D_lights/main.lua
@@ -15,8 +15,6 @@ local WALL_MESH_HEIGHT = math.tan( RL.DEG2RAD * ( 90 - SHADOW_FOV / 2 ) ) * LIGH
print( "WALL_MESH_HEIGHT", WALL_MESH_HEIGHT )
local monitor = 0
-local monitorPos = Vector2:newT( RL.GetMonitorPosition( monitor ) )
-local monitorSize = Vector2:newT( RL.GetMonitorSize( monitor ) )
local winScale = 1
local winSize = Vector2:new( RESOLUTION.x * winScale, RESOLUTION.y * winScale )
@@ -87,6 +85,9 @@ local function createShadowMesh()
end
function RL.init()
+ local monitorPos = Vector2:newT( RL.GetMonitorPosition( monitor ) )
+ local monitorSize = Vector2:newT( RL.GetMonitorSize( monitor ) )
+
RL.SetWindowState( RL.FLAG_WINDOW_RESIZABLE )
RL.SetWindowState( RL.FLAG_VSYNC_HINT )
RL.SetWindowSize( winSize )