diff options
Diffstat (limited to 'API.md')
| -rw-r--r-- | API.md | 21 |
1 files changed, 17 insertions, 4 deletions
@@ -2,12 +2,12 @@ ## Functions -Application needs 'main.lua' or 'main' file as entry point. ReiLua executable will first look it from same directory. Alternatively, path to the folder where "main.lua" is located can be given as argument. There are five Lua functions that the framework will call, 'RL.init', 'RL.update', 'RL.draw', 'RL.event', 'RL.log', and 'RL.exit'. +Application needs 'main.lua' or 'main' file as entry point. ReiLua executable will first look it from same directory. Alternatively, path to the folder where "main.lua" is located can be given as argument. There are seven Lua functions that the framework will call, 'RL.init', 'RL.update', 'RL.draw', 'RL.event', 'RL.log', 'RL.exit' and 'RL.config'. --- > function RL.init() -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. --- @@ -41,6 +41,12 @@ This function will be called on program close. Cleanup could be done here. --- +> function RL.config() + +This function will be called before InitWindow. Note! Only place where you should call InitWindow manually. Doesn't have OpenGL context at this point. + +--- + ## Object unloading Some objects allocate memory that needs to be freed when object is no longer needed. By default objects like Textures are unloaded by the Lua garbage collector. It is generatty however recommended to handle this manually in more complex projects. You can change the behavior with SetGCUnload. @@ -3764,6 +3770,13 @@ assignGlobalInt = nil --- +> RL.InitWindow( Vector2 size, string title ) + +Initialize window and OpenGL context. Note! Should be called only in RL.config. +InitWindow will still be called automatically before RL.init + +--- + > RL.CloseWindow() Close window and unload OpenGL context and free all resources @@ -3850,13 +3863,13 @@ Clear window configuration state flags (FLAG_FULLSCREEN_MODE, FLAG_WINDOW_RESIZA > RL.ToggleFullscreen() -Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP) +Toggle window state: fullscreen/windowed, resizes monitor to match window resolution --- > RL.ToggleBorderlessWindowed() -Toggle window state: borderless windowed (only PLATFORM_DESKTOP) +Toggle window state: borderless windowed, resizes window to match monitor resolution --- |
