summaryrefslogtreecommitdiff
path: root/ReiLua_API.lua
diff options
context:
space:
mode:
authorjussi2024-11-21 23:25:28 +0200
committerjussi2024-11-21 23:25:28 +0200
commitc9ebe23d6282e96b410dc7687e0be1c4f3ba1b4d (patch)
treedfd26a87fb2b2f702f77728b98a1e6c193684631 /ReiLua_API.lua
parentd96e33bb1772c28f630de32e09201c0cdea6f896 (diff)
downloadreilua-enhanced-c9ebe23d6282e96b410dc7687e0be1c4f3ba1b4d.tar.gz
reilua-enhanced-c9ebe23d6282e96b410dc7687e0be1c4f3ba1b4d.tar.bz2
reilua-enhanced-c9ebe23d6282e96b410dc7687e0be1c4f3ba1b4d.zip
RL.config and InitWindow.
Diffstat (limited to 'ReiLua_API.lua')
-rw-r--r--ReiLua_API.lua15
1 files changed, 12 insertions, 3 deletions
diff --git a/ReiLua_API.lua b/ReiLua_API.lua
index b781fd3..f68df06 100644
--- a/ReiLua_API.lua
+++ b/ReiLua_API.lua
@@ -4,7 +4,7 @@ RL={}
-- Functions.
----This function will be called first when 'main.lua' is found
+---This function will be called after window has been initialized. Should be used as the main init point.
function RL.init() end
---This function will be called every frame during execution. It will get time duration from last frame on argument 'delta'
---@param delta number
@@ -20,6 +20,8 @@ function RL.event( event ) end
function RL.log( logLevel, message ) end
---This function will be called on program close. Cleanup could be done here.
function RL.exit() end
+---This function will be called before InitWindow. Note! Only place where you should call InitWindow manually. Doesn't have OpenGL context at this point.
+function RL.config() end
-- Defines - System/Window config flags
@@ -1324,6 +1326,13 @@ RL.assignGlobalInt=nil
RL.assignGlobalInt=nil
-- Core - Window-related functions
+---Initialize window and OpenGL context. Note! Should be called only in RL.config.
+---InitWindow will still be called automatically before RL.init
+---@param size table
+---@param title string
+---@return any RL.InitWindow
+function RL.InitWindow( size, title ) end
+
---Close window and unload OpenGL context and free all resources
---@return any RL.CloseWindow
function RL.CloseWindow() end
@@ -1380,11 +1389,11 @@ function RL.SetWindowState( flag ) end
---@return any resized
function RL.ClearWindowState( flag ) end
----Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)
+---Toggle window state: fullscreen/windowed, resizes monitor to match window resolution
---@return any RL.ToggleFullscreen
function RL.ToggleFullscreen() end
----Toggle window state: borderless windowed (only PLATFORM_DESKTOP)
+---Toggle window state: borderless windowed, resizes window to match monitor resolution
---@return any RL.ToggleBorderlessWindowed
function RL.ToggleBorderlessWindowed() end