From c9ebe23d6282e96b410dc7687e0be1c4f3ba1b4d Mon Sep 17 00:00:00 2001 From: jussi Date: Thu, 21 Nov 2024 23:25:28 +0200 Subject: RL.config and InitWindow. --- examples/2D_lights/main.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'examples/2D_lights/main.lua') 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 ) -- cgit v1.2.3