From f3373d08c74e36b2161e1f4e4eef6aa7197352e0 Mon Sep 17 00:00:00 2001 From: Indrajith K L Date: Fri, 7 Nov 2025 04:44:30 +0530 Subject: docs: Add HTML documentation generator and improve documentation structure - Add html_docs/ directory with Python-based documentation generator - Include custom CSS styling for modern, clean documentation layout - Update README.md with improved formatting and documentation links - Enhance markdown documentation across all docs/ files: - Improve API documentation with better code examples - Refactor DOCUMENTATION_INDEX.md for clearer navigation - Update EMBEDDING.md, CUSTOMIZATION.md, and other guides - Standardize formatting and improve readability throughout - Fix inconsistent line endings and formatting issues The HTML documentation generator creates a styled, browsable version of the project documentation for easier reading and navigation. --- html_docs/README.md | 34 + html_docs/generate.py | 174 ++ html_docs/index.html | 15 + html_docs/manual.html | 2144 +++++++++++++++++ html_docs/reference.html | 6023 ++++++++++++++++++++++++++++++++++++++++++++++ html_docs/style.css | 136 ++ 6 files changed, 8526 insertions(+) create mode 100644 html_docs/README.md create mode 100644 html_docs/generate.py create mode 100644 html_docs/index.html create mode 100644 html_docs/manual.html create mode 100644 html_docs/reference.html create mode 100644 html_docs/style.css (limited to 'html_docs') diff --git a/html_docs/README.md b/html_docs/README.md new file mode 100644 index 0000000..ab45668 --- /dev/null +++ b/html_docs/README.md @@ -0,0 +1,34 @@ +# ReiLua Documentation + +Simple HTML documentation for ReiLua, inspired by the Lua manual style. + +## Contents + +- index.html - Homepage +- manual.html - Complete user guide +- reference.html - API reference (1924 functions and structures) +- style.css - Stylesheet +- generate.py - Documentation generator + +## Viewing + +Open index.html in any web browser. + +## Hosting + +Upload the entire html_docs folder to your web server. + +## Regenerating + +If you update the markdown source files, regenerate with: + + cd html_docs + python generate.py + +Requires Python 3. + +## Style + +Clean white background with navy blue headers, inspired by the official Lua manual. + +Simple, practical, and easy to read. diff --git a/html_docs/generate.py b/html_docs/generate.py new file mode 100644 index 0000000..4320bcc --- /dev/null +++ b/html_docs/generate.py @@ -0,0 +1,174 @@ +#!/usr/bin/env python3 +"""ReiLua Documentation Generator""" +import os, re +from pathlib import Path + +HTML_TEMPLATE = '''
\1',h)
+
+ # Restore code blocks
+ for i, block in enumerate(code_blocks):
+ content = re.search(r'```[^\n]*\n(.*?)```', block, re.DOTALL).group(1)
+ h = h.replace(f'___CODE_BLOCK_{i}___', f'{content}')
+
+ # Process line by line for paragraphs and lists
+ lines=h.split('\n')
+ result=[]
+ in_ul=False
+ in_pre=False
+ para_buffer=[]
+
+ def flush_para():
+ if para_buffer:
+ result.append('' + ' '.join(para_buffer) + '
') + para_buffer.clear() + + for line in lines: + s=line.strip() + + # Track pre blocks + if '' in line: + flush_para() + in_pre=True + result.append(line) + continue + if '' in line: + in_pre=False + result.append(line) + continue + if in_pre: + result.append(line) + continue + + # Handle list items + if s.startswith(('- ','* ')): + flush_para() + if not in_ul: + result.append('
Lua binding for Raylib.
Create main.lua:
function RL.init()\n RL.SetWindowTitle("Hello")\nend\n\nfunction RL.update(dt)\nend\n\nfunction RL.draw()\n RL.ClearBackground(RL.RAYWHITE)\n RL.DrawText("Hello!",190,200,20,RL.BLACK)\nendRun: ReiLua.exe
Complete function reference.
{i["definition"]}Lua binding for Raylib.
Create main.lua:
function RL.init()
+ RL.SetWindowTitle("Hello")
+end
+
+function RL.update(dt)
+end
+
+function RL.draw()
+ RL.ClearBackground(RL.RAYWHITE)
+ RL.DrawText("Hello!",190,200,20,RL.BLACK)
+endRun: ReiLua.exe
> A modified version of ReiLua with embedded main.lua, embedded assets, splash screens, and asset loading system
+This is an enhanced version of ReiLua featuring:
+ReiLua brings the power and simplicity of Raylib to the beginner-friendly Lua language in a straightforward manner. It is a loose binding to Raylib - some functions are excluded and some are added. The concept of pointing to a "main.lua" file and accessing functions "init", "update", and "draw" is borrowed from the Löve game framework.
+Note: ReiLua is lovingly handcrafted and will likely contain bugs and documentation errors, so it would be much appreciated if you would report any such findings. +Reilua means "fair" in Finnish. +This enhanced version is built upon:
+ReiLua is WIP and some planned raylib functionality is still missing, but it already has over 1000 functions. Current Raylib version is 5.5.
+List of some MISSING features that are planned to be included:
+Development Mode (Fast Iteration):
+# 1. Create your game files
+GameFolder/
+├── main.lua
+├── assets/
+│ ├── player.png
+│ └── music.wav
+
+# 2. Run ReiLua pointing to your game folder
+ReiLua.exe GameFolder/
+
+# Or from your game folder
+cd GameFolder
+path/to/ReiLua.exe
+
+# Skip splash screens during development
+ReiLua.exe --no-logo
+
+# Enable console for debugging
+ReiLua.exe --log --no-logo
+
+Release Mode (Single Executable):
+# See "Building for Release" section below
+
+Create a main.lua file:
local textColor = RL.BLACK
+local textPos = { 192, 200 }
+local textSize = 20
+local text = "Congrats! You created your first window!"
+
+function RL.init()
+ RL.SetWindowTitle( "First window" )
+ RL.SetWindowState( RL.FLAG_VSYNC_HINT )
+end
+
+function RL.update( delta )
+ if RL.IsKeyPressed( RL.KEY_ENTER ) then
+ local winSize = RL.GetScreenSize()
+ local measuredSize = RL.MeasureTextEx( RL.GetFontDefault(), text, textSize, 2 )
+
+ textColor = RL.BLUE
+ textPos = { winSize[1] / 2 - measuredSize[1] / 2, winSize[2] / 2 - measuredSize[2] / 2 }
+ end
+
+ if RL.IsKeyPressed( RL.KEY_SPACE ) then
+ textColor = RL.RED
+ textPos = { 192, 200 }
+ end
+end
+
+function RL.draw()
+ RL.ClearBackground( RL.RAYWHITE )
+ RL.DrawText( text, textPos, textSize, textColor )
+end
+
+Run it:
+ReiLua.exe --no-logo
+
+ReiLua looks for a 'main.lua' or 'main' file as the entry point. There are seven Lua functions that the framework will call:
+RL.init() - Called once at startup for initializationRL.update(delta) - Called every frame before draw, receives delta timeRL.draw() - Called every frame for renderingRL.event(event) - Called when events occurRL.log(logLevel, message) - Called for loggingRL.exit() - Called when the application is closingRL.config() - ⚠️ Deprecated in this versionAll functionality can be found in "API.md".
+This version includes customizable splash screens that display at startup:
+Screen 1: Custom text - Bold text on Raylib red background (customizable) +Screen 2: "Made using" - Displays Raylib and ReiLua logos side-by-side +Each screen fades in (0.8s), displays (2.5s), and fades out (0.8s) for a total of ~8 seconds.
+Skip During Development:
+ReiLua.exe --no-logo
+
+Customize:
+src/splash.clogo/ foldersrc/splash.cSee SPLASH_SCREENS.md for full documentation.
+Beautiful loading screen with progress tracking:
+function RL.init()
+ -- List your assets
+ local assets = {
+ "assets/player.png",
+ "assets/enemy.png",
+ "assets/background.png",
+ "assets/music.wav",
+ }
+
+ -- Start loading with progress
+ RL.BeginAssetLoading(#assets)
+
+ -- Load each asset
+ for i, path in ipairs(assets) do
+ RL.UpdateAssetLoading(path)
+
+ -- Your loading code
+ if path:match("%.png$") then
+ textures[i] = RL.LoadTexture(path)
+ elseif path:match("%.wav$") then
+ sounds[i] = RL.LoadSound(path)
+ end
+ end
+
+ -- Finish loading
+ RL.EndAssetLoading()
+end
+
+Features:
+See ASSET_LOADING.md for full documentation.
+Bundle all your Lua code into the executable for easy distribution:
+# Copy Lua files to build directory
+cd build
+copy ..\your_game\*.lua .
+
+# Build with embedding
+cmake .. -DEMBED_MAIN=ON
+cmake --build . --config Release
+
+Result: Single executable with all Lua code embedded!
+Package images, sounds, fonts, and other assets into your executable:
+# Create assets folder and copy files
+cd build
+mkdir assets
+copy ..\your_game\assets\* assets\
+
+# Build with embedding
+cmake .. -DEMBED_ASSETS=ON
+cmake --build . --config Release
+
+Your Lua code doesn't change! Use the same paths:
+-- Works in both development and release
+playerImg = RL.LoadTexture("assets/player.png")
+music = RL.LoadSound("assets/music.wav")
+
+See EMBEDDING.md for full documentation.
+By default, ReiLua runs without a console window for a clean user experience. Enable it for debugging:
+# Show console for debugging
+ReiLua.exe --log
+
+# Combine with other options
+ReiLua.exe --log --no-logo
+ReiLua.exe --log path/to/game
+
+This shows:
+One-command builds for development and release:
+Development Build (Fast Iteration):
+# Windows
+scripts\build_dev.bat
+
+# Linux/Unix
+chmod +x scripts/build_dev.sh
+scripts/build_dev.sh
+
+Release Build (Distribution):
+# Prepare files first
+cd build
+copy ..\your_game\*.lua .
+mkdir assets
+copy ..\your_game\assets\* assets\
+
+# Build release
+cd ..
+
+# Windows
+scripts\build_release.bat
+
+# Linux/Unix
+scripts/build_release.sh
+
+See BUILD_SCRIPTS.md for full documentation.
+ReiLua [Options] [Directory to main.lua or main]
+
+Options:
+ -h, --help Show help message
+ -v, --version Show ReiLua version
+ -i, --interpret Interpret mode [File name]
+ --log Show console window for logging (Windows only)
+ --no-logo Skip splash screens (development)
+
+# Run game in current directory
+ReiLua.exe
+
+# Run game in specific folder
+ReiLua.exe path/to/game/
+
+# Development mode (no splash, with console)
+ReiLua.exe --log --no-logo
+
+# Interpreter mode (run single script)
+ReiLua.exe -i script.lua
+
+# Show help
+ReiLua.exe --help
+
+# Show version
+ReiLua.exe --version
+
+Some objects allocate memory that needs to be freed when no longer needed. By default, objects like Textures are unloaded by the Lua garbage collector. However, it's generally recommended to handle this manually in more complex projects:
+RL.SetGCUnload()
+
+ReiLua can run single Lua files using interpreter mode:
+ReiLua -i hello.lua
+
+The given file will be called with dofile.
Generate API.md and ReiLua_API.lua from the build folder:
+ReiLua -i ../tools/docgen.lua
+
+Tip: Use tools/ReiLua_API.lua in your project folder to provide annotations when using "Lua Language Server".
+You'll need to statically link Raylib and Lua to create the executable. This simplifies distribution, especially on Linux where different distros use different library versions.
+# Download Raylib source
+# Run w64devkit.exe and navigate to raylib/src
+cd raylib/src
+mingw32-make
+
+# Copy libraylib.a to ReiLua/lib folder
+copy libraylib.a path\to\ReiLua\lib\
+
+Download Lua source from https://github.com/lua/lua
+Modify Lua's makefile:
+# Change this:
+MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE
+# To this:
+MYCFLAGS= $(LOCAL) -std=c99
+
+# Comment out or remove:
+MYLIBS= -ldl -lreadline
+
+Build:
+# In w64devkit, navigate to Lua folder
+mingw32-make
+
+# Copy liblua.a to ReiLua/lib folder
+copy liblua.a path\to\ReiLua\lib\
+
+Quick Method (Recommended):
+cd ReiLua
+scripts\build_dev.bat
+
+Manual Method:
+cd ReiLua\build
+cmake -G "MinGW Makefiles" ..
+mingw32-make
+
+cd build
+ReiLua.exe ..\examples\snake\
+
+If you see a low-res snake racing off the window, success! Press Enter to reset.
+sudo apt install build-essential cmake
+
+Compile Raylib and Lua by following their instructions. They will compile to libraylib.a and liblua.a by default.
Move both .a files to the ReiLua/lib folder.
Quick Method (Recommended):
+cd ReiLua
+chmod +x scripts/build_dev.sh
+scripts/build_dev.sh
+
+Manual Method:
+cd ReiLua/build
+cmake ..
+make
+
+./ReiLua ../examples/snake/
+
+Not tested, but should work similarly to Linux.
+Works best when Raylib is compiled using PLATFORM=DRM. See Raylib build instructions for Raspberry Pi.
Compile ReiLua with:
+cmake .. -DDRM=ON
+
+Note: DRM should be launched from CLI, not in X.
+Compile Raylib for web following its instructions: https://github.com/raysan5/raylib/wiki/Working-for-Web-(HTML5)
+Modify Lua's makefile:
+# Change:
+MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE
+# To:
+MYCFLAGS= $(LOCAL) -std=c99
+
+# Change:
+MYLIBS= -ldl -lreadline
+# To:
+MYLIBS= -ldl
+
+# Change:
+CC= gcc
+# To:
+CC= emcc
+
+# Change:
+CFLAGS= -Wall -O2 $(MYCFLAGS) -fno-stack-protector -fno-common -march=native
+# To:
+CFLAGS= -Wall -O2 $(MYCFLAGS) -fno-stack-protector -fno-common
+
+# Change:
+AR= ar rc
+# To:
+AR= emar
+
+# Change:
+$(AR) $@ $?
+# To:
+$(AR) rcs $@ $?
+
+Build with make if emsdk environmental variables are correct.
Put libraylib.a and liblua.a into ReiLua/lib/web/.
cd ReiLua/build
+mkdir resources
+# Copy main.lua to resources/
+# Copy assets to resources/
+
+Structure:
+ReiLua/
+└── build/
+ └── resources/
+ ├── main.lua
+ └── assets/
+
+cd build
+cmake .. -DCMAKE_TOOLCHAIN_FILE=/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DPLATFORM=Web
+make
+
+python -m http.server 8080
+
+Access in browser: localhost:8080/ReiLua.html
MyGame/
+├── main.lua
+├── player.lua
+├── enemy.lua
+├── assets/
+│ ├── player.png
+│ ├── enemy.png
+│ └── music.wav
+
+cd ReiLua/build
+
+# Copy all Lua files
+copy ..\MyGame\*.lua .
+
+# Copy assets
+mkdir assets
+copy ..\MyGame\assets\* assets\
+# Or: xcopy /E /I ..\MyGame\assets assets
+
+cd ..
+scripts\build_release.bat
+# Or: scripts/build_release.sh on Linux
+
+cd build
+ReiLua.exe --log
+
+Verify:
+mkdir Distribution
+copy ReiLua.exe Distribution\YourGameName.exe
+
+Your game is now a single executable ready for distribution!
+Edit CMakeLists.txt:
project( YourGameName ) # Change from "ReiLua"
+
+Replace icon.ico with your own icon file, then rebuild.
Edit resources.rc:
VALUE "CompanyName", "Your Studio Name"
+VALUE "FileDescription", "Your Game Description"
+VALUE "ProductName", "Your Game Name"
+VALUE "LegalCopyright", "Copyright (C) Your Name, 2025"
+
+Edit src/splash.c:
const char* text = "YOUR STUDIO NAME"; // Change this
+
+Replace logos:
+# Replace these files before building
+logo/raylib_logo.png
+logo/reilua_logo.png
+
+Zed is a modern, high-performance code editor. Here's how to set it up for ReiLua development:
+Download from: https://zed.dev/
+1. Open Zed 2. Press Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux) 3. Type "install language server" and select Lua 4. Zed will automatically install the Lua Language Server
Create .zed/settings.json in your project root:
{
+ "lsp": {
+ "lua-language-server": {
+ "settings": {
+ "Lua": {
+ "runtime": {
+ "version": "Lua 5.4"
+ },
+ "diagnostics": {
+ "globals": ["RL"]
+ },
+ "workspace": {
+ "library": ["ReiLua_API.lua"]
+ }
+ }
+ }
+ }
+ },
+ "languages": {
+ "Lua": {
+ "format_on_save": "on",
+ "formatter": "language_server"
+ }
+ }
+}
+
+Copy tools/ReiLua_API.lua to your project folder. This provides autocomplete and documentation for all ReiLua functions.
copy path\to\ReiLua\tools\ReiLua_API.lua your_game\
+
+Useful Zed shortcuts for Lua development:
+Ctrl+P / Cmd+P - Quick file searchCtrl+Shift+F / Cmd+Shift+F - Search in filesCtrl+. / Cmd+. - Code actionsF12 - Go to definitionShift+F12 - Find referencesCtrl+Space - Trigger autocompleteInstall useful extensions: 1. Press Ctrl+Shift+X / Cmd+Shift+X 2. Search and install:
Create a workspace for ReiLua projects:
+1. Open your game folder in Zed 2. File → Add Folder to Workspace 3. Add the ReiLua source folder (for reference) 4. File → Save Workspace As...
+This lets you easily reference ReiLua source while developing your game.
+For debugging Lua code with Zed:
+1. Use print() statements liberally 2. Run ReiLua with --log flag to see output 3. Use RL.TraceLog() for more detailed logging:
RL.TraceLog(RL.LOG_INFO, "Player position: " .. x .. ", " .. y)
+RL.TraceLog(RL.LOG_WARNING, "Low health!")
+RL.TraceLog(RL.LOG_ERROR, "Failed to load asset!")
+
+Run ReiLua directly from Zed's terminal:
+1. Press ` Ctrl+ ` / Cmd+ ` to open terminal 2. Run your game:
path\to\ReiLua.exe --log --no-logo
+
+1. Use Multiple Cursors: Alt+Click to add cursors, great for batch edits 2. Split Views: Ctrl+\ to split editor for side-by-side editing 3. Symbol Search: Ctrl+T / Cmd+T to search for functions 4. Zen Mode: Ctrl+K Z for distraction-free coding 5. Live Grep: Ctrl+Shift+F to search across all files
Game doesn't start:
+ to see error messages existsAssets not loading:
+ to see loading errorsSplash screens don't show:
+ flagLua files not embedded:
+ directory before building exists was usedAssets not embedded:
+ folder was usedBuild fails:
+ and liblua.a are in lib/ folder1. Check documentation files listed above 2. Review the examples in examples/ folder 3. Use --log` flag to see detailed error messages 4. Check your file paths and directory structure
Contributions are welcome! This is an enhanced version with additional features. When contributing:
+1. Test thoroughly with both development and release builds 2. Update documentation if adding features 3. Follow existing code style 4. Test on multiple platforms if possible
+ReiLua is licensed under the zlib/libpng license. See LICENSE file for details.
+---
+Happy Game Development!
+When you're ready to ship your game, you can embed all Lua files and asset files directly into the executable.
+Development Build (Fast Iteration)
+During development, use external files for quick iteration.
+Setup:
+GameFolder/
+├── ReiLua.exe
+├── main.lua
+├── player.lua
+└── assets/
+ ├── player.png
+ └── music.wav
+
+Build:
+cd build
+cmake ..
+cmake --build .
+
+Benefits:
+--log flagRelease Build (Single Executable)
+For distribution, embed everything into one file.
+Setup:
+cd build
+
+# Copy Lua files to build directory
+copy ..\main.lua .
+copy ..\player.lua .
+
+# Create assets folder and copy files
+mkdir assets
+copy ..\player.png assets\
+copy ..\music.wav assets\
+
+Build:
+# Configure with embedding
+cmake .. -DEMBED_MAIN=ON -DEMBED_ASSETS=ON
+
+# Build release
+cmake --build . --config Release
+
+Result:
+Distribution/
+└── YourGame.exe (Everything embedded!)
+
+Benefits:
+1. Copy your Lua files to the build directory:
+ copy main.lua build\main.lua
+ copy player.lua build\player.lua
+
+2. Build with EMBED_MAIN option:
+ cd build
+ cmake .. -DEMBED_MAIN=ON
+ cmake --build . --config Release
+
+ReiLua supports several command-line options:
+ReiLua [Options] [Directory to main.lua or main]
+
+Options:
+ -h, --help Show help message
+ -v, --version Show ReiLua version
+ -i, --interpret Interpret mode [File name]
+ --log Show console window for logging (Windows only)
+
+By default, ReiLua runs without a console window for a clean user experience. To enable console output for debugging:
+# Run with console for debugging
+ReiLua.exe --log
+
+# You can also combine with other options
+ReiLua.exe --log path/to/game
+
+# Or with interpret mode
+ReiLua.exe --log -i script.lua
+
+This is useful during development to see:
+Here's a complete step-by-step guide to prepare your game for release:
+Ensure your project has this structure:
+MyGame/
+├── main.lua
+├── player.lua
+├── enemy.lua
+├── player.png
+├── enemy.png
+├── music.wav
+└── icon.ico (optional)
+
+Change executable icon:
+# Replace ReiLua's icon with yours
+copy MyGame\icon.ico ReiLua\icon.ico
+
+Edit executable properties: Open ReiLua\resources.rc and modify:
VALUE "CompanyName", "Your Studio Name"
+VALUE "FileDescription", "Your Game Description"
+VALUE "ProductName", "Your Game Name"
+VALUE "LegalCopyright", "Copyright (C) Your Name, 2025"
+
+Change executable name: Edit ReiLua\CMakeLists.txt:
project( YourGameName ) # Change from "ReiLua"
+
+See CUSTOMIZATION.md for full details.
+assets/ prefix, so use the same paths in both development and release:
+-- Correct - works in both dev and release
+playerImage = RL.LoadTexture("assets/player.png")
+backgroundImg = RL.LoadTexture("assets/background.png")
+musicSound = RL.LoadSound("assets/music.wav")
+
+Your Lua code doesn't need to change between development and release builds!
+cd ReiLua\build
+
+# Copy all Lua files
+copy ..\MyGame\*.lua .
+
+# Create assets folder
+mkdir assets
+
+# Copy all asset files (images, sounds, etc.)
+copy ..\MyGame\*.png assets\
+copy ..\MyGame\*.wav assets\
+copy ..\MyGame\*.ogg assets\
+# Or copy entire folders
+xcopy /E /I ..\MyGame\images assets\images
+xcopy /E /I ..\MyGame\sounds assets\sounds
+
+# Configure with embedding enabled
+cmake .. -DEMBED_MAIN=ON -DEMBED_ASSETS=ON
+
+# Build in release mode
+cmake --build . --config Release
+
+# Test with console to verify everything loaded
+YourGameName.exe --log
+
+# Test production mode (no console)
+YourGameName.exe
+
+Check console output for:
+# Create distribution folder
+mkdir ..\Distribution
+copy YourGameName.exe ..\Distribution\
+
+# Optional: Add README, LICENSE, etc.
+copy ..\README.txt ..\Distribution\
+
+Your game is now ready to distribute as a single executable!
+| Stage | Build Command | Files Needed | Result | |-------|--------------|--------------|--------| | Development | cmake .. && cmake --build . | Lua + assets external | Fast iteration | | Testing | cmake .. -DEMBED_MAIN=ON && cmake --build . | Lua in build/ | Test embedding | | Release | cmake .. -DEMBED_MAIN=ON -DEMBED_ASSETS=ON && cmake --build . --config Release | Lua + assets in build/ | Single .exe |
Problem: "No .lua files found in build directory"
+# Solution: Copy Lua files to build directory
+copy ..\*.lua .
+
+Problem: "No files found in assets folder"
+# Solution: Create assets folder and copy files
+mkdir assets
+copy ..\*.png assets\
+
+Problem: Game crashes on startup
+# Solution: Run with --log to see error messages
+YourGameName.exe --log
+
+Problem: Assets not loading
+build/assets/ before building--log to see loading errors.lua files in the build directory root are embedded when using EMBED_MAIN=ONEMBED_ASSETS=ONmain.lua must exist and is always the entry pointassets/images/player.png → Load with LoadImage("player.png")Want to add your own icon and version info to the executable? See CUSTOMIZATION.md for details on:
+ReiLua includes a built-in asset loading system with a loading screen UI that shows progress while assets are being loaded.
+Initialize asset loading progress tracking and show the loading screen.
+Parameters:
+totalAssets (integer) - Total number of assets to loadExample:
+RL.BeginAssetLoading(10) -- We're loading 10 assets
+
+---
+Update the loading progress and display current asset being loaded.
+Parameters:
+assetName (string) - Name of the asset currently being loadedExample:
+RL.UpdateAssetLoading("player.png")
+
+Call this after each asset is loaded to update the progress bar.
+---
+Finish asset loading and hide the loading screen.
+Example:
+RL.EndAssetLoading()
+
+function RL.init()
+ -- List of assets to load
+ local assetsToLoad = {
+ "assets/player.png",
+ "assets/enemy.png",
+ "assets/background.png",
+ "assets/music.wav",
+ }
+
+ -- Begin loading
+ RL.BeginAssetLoading(#assetsToLoad)
+
+ -- Load each asset
+ for i, path in ipairs(assetsToLoad) do
+ RL.UpdateAssetLoading(path) -- Update progress
+
+ -- Load the actual asset
+ if path:match("%.png$") or path:match("%.jpg$") then
+ textures[i] = RL.LoadTexture(path)
+ elseif path:match("%.wav$") or path:match("%.ogg$") then
+ sounds[i] = RL.LoadSound(path)
+ end
+ end
+
+ -- Done!
+ RL.EndAssetLoading()
+end
+
+local assets = {}
+
+local assetsToLoad = {
+ {type="texture", name="player", path="assets/player.png"},
+ {type="texture", name="enemy", path="assets/enemy.png"},
+ {type="texture", name="background", path="assets/background.png"},
+ {type="sound", name="music", path="assets/music.wav"},
+ {type="sound", name="shoot", path="assets/shoot.wav"},
+ {type="font", name="title", path="assets/title.ttf"},
+}
+
+function RL.init()
+ RL.SetWindowTitle("My Game")
+
+ -- Start loading with progress
+ RL.BeginAssetLoading(#assetsToLoad)
+
+ -- Load all assets
+ for i, asset in ipairs(assetsToLoad) do
+ -- Show current asset name on loading screen
+ RL.UpdateAssetLoading(asset.name)
+
+ -- Load based on type
+ if asset.type == "texture" then
+ assets[asset.name] = RL.LoadTexture(asset.path)
+ elseif asset.type == "sound" then
+ assets[asset.name] = RL.LoadSound(asset.path)
+ elseif asset.type == "font" then
+ assets[asset.name] = RL.LoadFont(asset.path)
+ end
+ end
+
+ -- Loading complete!
+ RL.EndAssetLoading()
+
+ print("Game ready!")
+end
+
+function RL.update(delta)
+ -- Your game logic
+end
+
+function RL.draw()
+ RL.ClearBackground(RL.RAYWHITE)
+
+ -- Use loaded assets
+ if assets.background then
+ RL.DrawTexture(assets.background, {0, 0}, RL.WHITE)
+ end
+
+ if assets.player then
+ RL.DrawTexture(assets.player, {100, 100}, RL.WHITE)
+ end
+end
+
+The loading screen features a clean 1-bit pixel art style:
+Design:
+Elements:
+Background:
+Color Palette:
+Style Inspiration:
+If you want to customize the loading screen appearance, you can modify the colors and sizes in src/lua_core.c in the drawLoadingScreen() function.
1. Call UpdateAssetLoading AFTER loading - This ensures the progress updates at the right time 2. Load assets in order of importance - Load critical assets first 3. Group similar assets - Load all textures, then sounds, etc. 4. Use descriptive names - Shows better feedback to users
+local files = {"player.png", "enemy.png", "music.wav"}
+RL.BeginAssetLoading(#files)
+for i, file in ipairs(files) do
+ RL.UpdateAssetLoading(file)
+ -- load file
+end
+RL.EndAssetLoading()
+
+local assets = {
+ textures = {"player.png", "enemy.png"},
+ sounds = {"music.wav", "shoot.wav"},
+}
+local total = #assets.textures + #assets.sounds
+
+RL.BeginAssetLoading(total)
+for _, file in ipairs(assets.textures) do
+ RL.UpdateAssetLoading(file)
+ -- load texture
+end
+for _, file in ipairs(assets.sounds) do
+ RL.UpdateAssetLoading(file)
+ -- load sound
+end
+RL.EndAssetLoading()
+
+RL.BeginAssetLoading(#files)
+for i, file in ipairs(files) do
+ RL.UpdateAssetLoading(file)
+
+ if RL.FileExists(file) then
+ -- load file
+ else
+ print("Warning: " .. file .. " not found")
+ end
+end
+RL.EndAssetLoading()
+
+Use the loading system when:
+You can skip it when:
+The loading system makes your game feel polished with just a few lines of code!
+ReiLua includes a built-in splash screen system that displays splash screens before your game loads. This gives your game a polished appearance right from startup.
+When you run your ReiLua game, it automatically shows two splash screens in sequence:
+1. Custom Text - Clean, bold text on Raylib red background (similar to Squid Game style) 2. "Made using" - Text with Raylib and ReiLua logos displayed side-by-side
+Each splash screen:
+The logo images are always embedded into the executable in both development and release builds. This means:
+The splash screens display before your game's asset loading begins. This means:
+1. User starts your game 2. Splash screens play (~8 seconds) 3. Your RL.init() function runs 4. Asset loading with progress indicator (if you use it) 5. Your game starts
This creates a smooth, polished startup experience.
+During development, you often need to test your game repeatedly. Waiting for splash screens every time can slow down your workflow. Use the --no-logo flag to skip them:
# Windows
+ReiLua.exe --no-logo
+
+# Linux/Mac
+./ReiLua --no-logo
+
+# With other options
+ReiLua.exe --log --no-logo
+./ReiLua --no-logo path/to/game/
+
+Note: The --no-logo flag only works in development. In release builds, users should see the full splash screen sequence.
+The splash screen system is implemented in C and runs before any Lua code executes:
+1. Logo Embedding: During build, scripts/embed_logo.py converts PNG files to C byte arrays 2. Initialization: Before calling RL.init(), the engine initializes splash screens 3. Display Loop: A dedicated loop handles timing, fading, and rendering 4. Cleanup: After completion, resources are freed and Lua code begins
src/splash.c - Splash screen implementationinclude/splash.h - Header filescripts/embed_logo.py - Python script to embed logo imageslogo/raylib_logo.png - Raylib logo (embedded)logo/reilua_logo.png - ReiLua logo (embedded)The CMakeLists.txt automatically:
+1. Runs scripts/embed_logo.py during build 2. Generates embedded_logo.h with logo data 3. Defines EMBED_LOGO flag 4. Compiles splash.c with the project
No manual steps required - it just works!
+To change the default text to your studio name:
+1. Open src/splash.c 2. Find the splash drawing function 3. Change the text line:
const char* text = "YOUR STUDIO NAME";
+
+4. Rebuild the project
+Note: Use ALL CAPS for the Squid Game-style aesthetic. +To use different logos:
+1. Replace logo/raylib_logo.png and/or logo/reilua_logo.png with your images 2. Recommended size: 256x256 or smaller (logos are auto-scaled to max 200px) 3. Format: PNG with transparency support 4. Rebuild the project - logos will be automatically embedded
To adjust how long each screen displays:
+1. Open src/splash.c 2. Modify these constants at the top:
#define FADE_IN_TIME 0.8f // Seconds to fade in
+ #define DISPLAY_TIME 2.5f // Seconds to display fully
+ #define FADE_OUT_TIME 0.8f // Seconds to fade out
+
+3. Rebuild the project
+If you don't want any splash screens:
+1. Open src/main.c 2. Find this block:
/* Show splash screens if not skipped */
+ if ( !skip_splash ) {
+ splashInit();
+ // ... splash code ...
+ splashCleanup();
+ }
+
+3. Comment out or remove the entire block 4. Rebuild the project
+Here's what a typical game startup looks like with everything enabled:
+ReiLua.exe MyGame/
+
+User Experience: 1. Splash Screen 1 (4.1 seconds)
+2. Splash Screen 2 (4.1 seconds)
+3. Asset Loading (varies)
+4. Game Start
+1. Keep --no-logo for Development: Always use --no-logo during active development 2. Test Without Flag: Occasionally test without --no-logo to ensure splash screens work 3. Customize for Your Studio: Change the text and logos to match your branding 4. Consider Total Time: Splash (~8s) + Loading (varies) = Total startup time 5. Optimize Loading: Keep asset loading fast to maintain a good first impression
--no-logo flaglogo/ folder before buildingcmake .. && make clean && makescripts/embed_logo.py has correct pathslogo/ folder exists with both PNG files# Development (skip splash)
+ReiLua --no-logo
+
+# Development with logging
+ReiLua --log --no-logo
+
+# Production/testing (full splash)
+ReiLua
+
+# Help
+ReiLua --help
+
+---
+The splash screen system adds a polished touch to your ReiLua games with minimal effort. Customize it to match your studio's branding and give players a great first impression!
+ReiLua includes automated build scripts for easy development and release builds.
+scripts\build_dev.batscripts/build_dev.shscripts\build_release.batscripts/build_release.shFast iteration during game development with external Lua files and assets.
+Windows:
+scripts\build_dev.bat
+
+Linux/Unix:
+chmod +x scripts/build_dev.sh
+scripts/build_dev.sh
+
+scripts\build_dev.bat clean or scripts/build_dev.sh cleanbuild/ReiLua.execd your_game && path/to/build/ReiLua.exepath/to/build/ReiLua.exe --logCreate a single-file executable for distribution with all code and assets embedded.
+Before running the release build, prepare your files:
+cd build
+
+# Copy all Lua files
+copy ..\your_game\*.lua .
+# Or: cp ../your_game/*.lua .
+
+# Copy assets
+mkdir assets
+copy ..\your_game\assets\* assets\
+# Or: cp -r ../your_game/assets/* assets/
+
+Windows:
+scripts\build_release.bat
+
+Linux/Unix:
+chmod +x scripts/build_release.sh
+scripts/build_release.sh
+
+build/ directorybuild/assets/ folderbuild/ReiLua.exeThe release build automatically configures:
+EMBED_MAIN=ON - Embeds all Lua filesEMBED_ASSETS=ON - Embeds all assets (if assets folder exists)CMAKE_BUILD_TYPE=Release - Optimized build1. Replace icon.ico with your own icon file 2. Keep the same filename or update resources.rc 3. Rebuild
Edit resources.rc to customize:
VALUE "CompanyName", "Your Studio Name"
+VALUE "FileDescription", "Your Game Description"
+VALUE "ProductName", "Your Game Name"
+VALUE "LegalCopyright", "Copyright (C) Your Name, 2025"
+
+Edit CMakeLists.txt:
project( YourGameName ) # Line 6
+
+After building, the executable will be named YourGameName.exe.
# Initial setup
+scripts\build_dev.bat
+
+# Edit your Lua files in your game directory
+# ... make changes ...
+
+# Just run - no rebuild needed!
+cd your_game
+path\to\build\ReiLua.exe
+
+# If you modify C code, rebuild
+scripts\build_dev.bat
+
+# 1. Prepare files
+cd build
+copy ..\your_game\*.lua .
+mkdir assets
+copy ..\your_game\assets\* assets\
+
+# 2. Build release
+cd ..
+scripts\build_release.bat
+
+# 3. Test
+cd build
+ReiLua.exe --log
+
+# 4. Distribute
+# Copy build\ReiLua.exe to your distribution folder
+
+CMakeLists.txt exists in parent directorybuild/ directory before release buildmain.lua exists (required entry point)scripts\build_dev.bat cleanchmod +x build_*.shThis guide explains how to customize the ReiLua executable with your own branding.
+You can customize:
+The easiest customization - change "ReiLua.exe" to "YourGame.exe".
+1. Open CMakeLists.txt 2. Find line 6 (near the top):
project( ReiLua )
+
+3. Change to your game name:
+ project( MyAwesomeGame )
+
+4. Rebuild:
+ cd build
+ cmake ..
+ cmake --build . --config Release
+
+Result: Executable is now named MyAwesomeGame.exe
Replace the default icon with your game's icon.
+1. Create or convert your image to .ico format 2. Replace icon.ico in the ReiLua root folder with your icon 3. Keep the same filename (icon.ico) or update resources.rc:
IDI_ICON1 ICON "your_icon.ico"
+
+4. Rebuild the project
+Tip: Many online tools can convert PNG to ICO: +When users right-click your .exe and select "Properties", they see file information. Customize this to show your game details.
+1. Open resources.rc 2. Find the VERSIONINFO section 3. Modify these values:
1 VERSIONINFO
+FILEVERSION 1,0,0,0 // Change version numbers
+PRODUCTVERSION 1,0,0,0 // Change product version
+FILEFLAGSMASK 0x3fL
+FILEFLAGS 0x0L
+FILEOS VOS_NT_WINDOWS32
+FILETYPE VFT_APP
+FILESUBTYPE VFT2_UNKNOWN
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "CompanyName", "Your Studio Name" // Your company/studio
+ VALUE "FileDescription", "Your Game - An awesome game" // Game description
+ VALUE "FileVersion", "1.0.0.0" // File version string
+ VALUE "InternalName", "YourGame" // Internal name
+ VALUE "LegalCopyright", "Copyright (C) 2025 Your Name" // Copyright notice
+ VALUE "OriginalFilename", "YourGame.exe" // Original filename
+ VALUE "ProductName", "Your Game" // Product name
+ VALUE "ProductVersion", "1.0.0.0" // Product version string
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+1,0,0,0 for version 1.0.0.02,3,1,5 for version 2.3.1.54. Rebuild the project
+Change the text and logos that appear when your game starts.
+1. Open src/splash.c 2. Find the splash drawing function (around line 150) 3. Change this line:
const char* text = "YOUR STUDIO NAME";
+
+Style Tips:
+1. Create or find your logos:
+2. Replace these files:
+ logo/raylib_logo.png → Your game logo
+ logo/reilua_logo.png → Your studio logo (or keep ReiLua logo as credit)
+
+3. Logo sizing:
+4. Rebuild the project - logos are automatically embedded
+1. Open src/splash.c 2. Modify these constants at the top:
#define FADE_IN_TIME 0.8f // Seconds to fade in (default: 0.8)
+ #define DISPLAY_TIME 2.5f // Seconds fully visible (default: 2.5)
+ #define FADE_OUT_TIME 0.8f // Seconds to fade out (default: 0.8)
+
+Recommendations:
+1. Open src/splash.c 2. Find color definitions:
// First splash screen background (Raylib red)
+ Color bgColor = (Color){ 230, 41, 55, 255 }; // Change these RGB values
+
+ // Second splash screen background (Black)
+ Color bg = BLACK; // Change to any color
+
+Color Examples:
+(Color){ 255, 255, 255, 255 }(Color){ 0, 120, 215, 255 }(Color){ 32, 32, 32, 255 }(Color){ R, G, B, 255 }Change the appearance of the asset loading screen.
+1. Open src/lua_core.c 2. Find the drawLoadingScreen() function 3. Modify colors and style:
// Background color
+Color bgColor = BLACK; // Change background
+
+// Text color
+Color textColor = WHITE; // Change text color
+
+// Progress bar fill color
+Color fillColor = WHITE; // Change bar fill
+
+// Border color
+Color borderColor = WHITE; // Change borders
+
+// In drawLoadingScreen() function
+const char* loadingText = "LOADING"; // Change to "LOADING GAME", etc.
+
+int barWidth = 200; // Default 200px, change as needed
+int barHeight = 16; // Default 16px, change as needed
+int borderThick = 2; // Border thickness
+
+Here's a complete example of rebranding ReiLua as "Space Quest":
+project( SpaceQuest )
+
+VALUE "CompanyName", "Cosmic Games Studio"
+VALUE "FileDescription", "Space Quest - Explore the Galaxy"
+VALUE "FileVersion", "1.0.0.0"
+VALUE "InternalName", "SpaceQuest"
+VALUE "LegalCopyright", "Copyright (C) 2025 Cosmic Games"
+VALUE "OriginalFilename", "SpaceQuest.exe"
+VALUE "ProductName", "Space Quest"
+VALUE "ProductVersion", "1.0.0.0"
+
+Replace with your space-themed icon
+const char* text = "COSMIC GAMES STUDIO";
+
+logo/raylib_logo.png → Your game logo (space ship, planet, etc.)
+logo/reilua_logo.png → Studio logo (keep ReiLua logo for credit)
+
+cd build
+cmake ..
+cmake --build . --config Release
+
+Result: SpaceQuest.exe with all your custom branding!
If you want to completely remove ReiLua references:
+1. Open src/splash.c 2. Find drawMadeWithSplash() function 3. Comment out or modify the function to only show your logo
1. Open src/main.c 2. Find the splash screen loop 3. Modify to only call your custom splash
After making any customizations:
+# Clean build (recommended after customizations)
+cd build
+rm -rf * # Or: rmdir /s /q * on Windows
+cmake ..
+cmake --build . --config Release
+
+# Test with console
+YourGame.exe --log
+
+# Test production mode
+YourGame.exe
+
+Verify:
+Before releasing your game:
+1. Consistent Branding: Use the same colors, fonts, and style across splash screens, loading screen, and in-game UI
+2. Icon Quality: Invest time in a good icon - it's the first thing users see
+3. Version Management: Update version numbers for each release
+4. Legal Info: Always include proper copyright and attribution
+5. Test Everything: Test your branded executable on a clean system
+6. Keep Credits: Mention Raylib and ReiLua in your game's credits screen
+Icon doesn't change:
+IconCache.dbProperties don't update:
+resources.rc syntax is correctSplash screens don't show changes:
+scripts/embed_logo.py ran successfullylogo/ folderExecutable name unchanged:
+CMakeLists.txt project name---
+Now your ReiLua executable is fully branded and ready to represent your game!
+This guide explains how to set up autocomplete, type hints, and documentation for ReiLua in Zed Editor.
+---
+Zed uses the Lua Language Server (LuaLS) for Lua support. ReiLua includes tools/ReiLua_API.lua with LuaLS annotations.
Zed should automatically install LuaLS when you open a Lua file. If not:
+1. Open Zed 2. Go to Extensions (Cmd/Ctrl + Shift + X) 3. Search for "Lua" 4. Install the Lua extension
+Create a .luarc.json file in your project root:
{
+ "runtime.version": "Lua 5.4",
+ "workspace.library": [
+ "${3rd}/luassert/library",
+ "${3rd}/busted/library"
+ ],
+ "completion.enable": true,
+ "diagnostics.globals": [
+ "RL"
+ ],
+ "workspace.checkThirdParty": false
+}
+
+Copy tools/ReiLua_API.lua to your game project folder:
# From ReiLua directory
+cp tools/ReiLua_API.lua /path/to/your/game/project/
+
+Or on Windows:
+Copy-Item tools/ReiLua_API.lua "C:\path\to\your\game\project\"
+
+For better organization, create a library directory:
+your-game/
+├── main.lua
+├── .luarc.json
+└── .lua/
+ └── tools/ReiLua_API.lua
+
+Update .luarc.json:
{
+ "runtime.version": "Lua 5.4",
+ "workspace.library": [".lua"],
+ "completion.enable": true,
+ "diagnostics.globals": ["RL"],
+ "workspace.checkThirdParty": false
+}
+
+---
+To make ReiLua API available for all projects:
+1. Create directory: %USERPROFILE%\.luarocks\lib\lua\5.4\ 2. Copy tools/ReiLua_API.lua to this directory 3. Add to global LuaLS config:
%APPDATA%\Zed\settings.json or via Zed settings
+{
+ "lsp": {
+ "lua-language-server": {
+ "settings": {
+ "Lua.workspace.library": [
+ "C:\\Users\\YourName\\.luarocks\\lib\\lua\\5.4"
+ ],
+ "Lua.diagnostics.globals": ["RL"]
+ }
+ }
+ }
+}
+
+1. Create directory: ~/.lua/reilua/ 2. Copy tools/ReiLua_API.lua to this directory 3. Update Zed settings:
{
+ "lsp": {
+ "lua-language-server": {
+ "settings": {
+ "Lua.workspace.library": [
+ "~/.lua/reilua"
+ ],
+ "Lua.diagnostics.globals": ["RL"]
+ }
+ }
+ }
+}
+
+---
+Create a .zed/settings.json in your project: > Note There is a sample zed settings json file in the repo root (zed.sample.settings.json)
{
+ "lsp": {
+ "lua-language-server": {
+ "settings": {
+ "Lua.runtime.version": "Lua 5.4",
+ "Lua.workspace.library": [
+ "."
+ ],
+ "Lua.completion.enable": true,
+ "Lua.completion.callSnippet": "Replace",
+ "Lua.completion.displayContext": 3,
+ "Lua.diagnostics.globals": [
+ "RL"
+ ],
+ "Lua.hint.enable": true,
+ "Lua.hint.paramName": "All",
+ "Lua.hint.setType": true
+ }
+ }
+ }
+}
+
+---
+Create a test file test.lua:
function RL.init()
+ -- Type "RL." and you should see autocomplete
+ RL.SetWindowTitle("Test") -- Should show documentation
+
+ local color = RL.RED -- Should autocomplete color constants
+
+ -- Hover over functions to see documentation
+ RL.DrawText("Hello", 10, 10, 20, color)
+end
+
+function RL.update(delta)
+ -- 'delta' should show as number type
+end
+
+If autocomplete works, you should see:
+RL.---
+In Zed settings:
+{
+ "inlay_hints": {
+ "enabled": true
+ },
+ "lsp": {
+ "lua-language-server": {
+ "settings": {
+ "Lua.hint.enable": true,
+ "Lua.hint.paramName": "All",
+ "Lua.hint.setType": true,
+ "Lua.hint.paramType": true
+ }
+ }
+ }
+}
+
+This will show:
+Add these to suppress common false positives:
+{
+ "lsp": {
+ "lua-language-server": {
+ "settings": {
+ "Lua.diagnostics.disable": [
+ "lowercase-global",
+ "unused-local",
+ "duplicate-set-field",
+ "missing-fields",
+ "undefined-field"
+ ],
+ "Lua.diagnostics.globals": ["RL"]
+ }
+ }
+ }
+}
+
+Common warnings and what they mean:
+lowercase-global - Using global variables with lowercase names (RL is intentional)unused-local - Local variables that aren't usedduplicate-set-field - Redefining functions (callback functions are expected to be redefined)missing-fields - Table fields that might not existundefined-field - Accessing fields that aren't documented> Note: The tools/ReiLua_API.lua file now uses type annotations instead of function definitions for callbacks to prevent duplicate warnings.
---
+Duplicate field 'init'. (Lua Diagnostics. duplicate-set-field)
+Why: The tools/ReiLua_API.lua file previously defined callback functions as empty function definitions. When you define them in your main.lua, LSP sees it as redefining the same field.
+Solution: The latest tools/ReiLua_API.lua now uses type annotations instead:
+-- Old way (caused warnings)
+function RL.init() end
+
+-- New way (no warnings)
+---@type fun()
+RL.init = nil
+
+Fix Steps: 1. Update tools/ReiLua_API.lua - Copy the latest version from the repository 2. Or add to diagnostics.disable in your configuration:
{
+ "diagnostics.disable": ["duplicate-set-field"]
+ }
+
+3. Restart Zed to reload the configuration
+Benefits of the new approach:
+---
+1. Restart Zed after configuration changes 2. Check LSP Status: Look for Lua Language Server in bottom-right status bar 3. Verify File Location: Ensure tools/ReiLua_API.lua is in the workspace 4. Check Console: Open Zed's log to see LSP errors
If the language server is slow:
+{
+ "lsp": {
+ "lua-language-server": {
+ "settings": {
+ "Lua.workspace.maxPreload": 2000,
+ "Lua.workspace.preloadFileSize": 1000
+ }
+ }
+ }
+}
+
+Ensure hover is enabled:
+{
+ "hover_popover_enabled": true
+}
+
+---
+You can extend tools/ReiLua_API.lua with your own game types:
---@class Player
+---@field x number
+---@field y number
+---@field health number
+
+---@class Enemy
+---@field x number
+---@field y number
+---@field damage number
+
+-- Your game globals
+---@type Player
+player = {}
+
+---@type Enemy[]
+enemies = {}
+
+---
+Ctrl+Space (Windows/Linux) or Cmd+Space (macOS)Ctrl+K Ctrl+IF12 or Cmd+ClickShift+F12F2---
+---
+my-reilua-game/
+├── .luarc.json # LuaLS configuration
+├── .zed/
+│ └── settings.json # Zed-specific settings
+├── tools/ReiLua_API.lua # API definitions (copy from ReiLua)
+├── main.lua # Your game entry point
+├── player.lua
+├── enemy.lua
+└── assets/
+ ├── sprites/
+ └── sounds/
+
+---
+Save this as .luarc.json in your project:
{
+ "runtime.version": "Lua 5.4",
+ "completion.enable": true,
+ "completion.callSnippet": "Replace",
+ "diagnostics.globals": ["RL"],
+ "diagnostics.disable": [
+ "lowercase-global",
+ "duplicate-set-field",
+ "missing-fields"
+ ],
+ "workspace.checkThirdParty": false,
+ "workspace.library": ["."],
+ "hint.enable": true
+}
+
+Save this as .zed/settings.json:
{
+ "lsp": {
+ "lua-language-server": {
+ "settings": {
+ "Lua.hint.enable": true,
+ "Lua.hint.paramName": "All",
+ "Lua.hint.setType": true,
+ "Lua.diagnostics.disable": [
+ "lowercase-global",
+ "duplicate-set-field",
+ "missing-fields"
+ ]
+ }
+ }
+ },
+ "inlay_hints": {
+ "enabled": true
+ }
+}
+
+Then copy tools/ReiLua_API.lua to your project root, and you're ready to go!
---
+Happy Coding!
+Complete function reference.
function RL.init()This function will be called after window has been initialized. Should be used as the main init point.
function RL.update( delta )This function will be called every frame during execution. It will get time duration from last frame on argument 'delta'
function RL.draw()This function will be called every frame after update and it should have all rendering related functions. Note: Engine will call Raylib functions 'BeginDrawing()' before this function call and 'EndDrawing()' after it. You can still use RL.BeginDrawing() and RL.EndDrawing() manually from anywhere.
function RL.event( event )This function will be called on events input. Content of event table is determined by event type.
function RL.log( logLevel, message )This function can be used for custom log message handling.
function RL.exit()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.
function RL.load()This function will be called when loading resource that allocates memory. Usefull for memory leak debugging. Note! Cannot detect all resources, for example material textures.
function RL.unload()This function will be called when unloading resource that has allocated memory. Usefull for memory leak debugging. Note! Cannot detect all resources, for example material textures.
RL.BeginAssetLoading( int totalAssets )Initialize asset loading progress tracking and show the loading screen. This displays a beautiful loading UI with progress bar and asset names.
+Parameters:
+totalAssets (integer) - Total number of assets to loadExample:
+RL.BeginAssetLoading(10) -- We're loading 10 assets
+
+Features:
+RL.UpdateAssetLoading( string assetName )Update loading progress for the current asset. Call this after each asset is loaded to update the progress bar and display.
+Parameters:
+assetName (string) - Name of the asset currently being loadedExample:
+RL.UpdateAssetLoading("player.png")
+-- Load the asset here
+playerTexture = RL.LoadTexture("assets/player.png")
+
+Notes:
+RL.EndAssetLoading()Finish asset loading and hide the loading screen. Call this after all assets have been loaded.
+Example:
+RL.EndAssetLoading()
+
+Complete Example:
+function RL.init()
+ local assets = {}
+ local assetsToLoad = {
+ "assets/player.png",
+ "assets/enemy.png",
+ "assets/background.png",
+ "assets/music.wav",
+ }
+
+ -- Begin loading
+ RL.BeginAssetLoading(#assetsToLoad)
+
+ -- Load each asset
+ for i, path in ipairs(assetsToLoad) do
+ RL.UpdateAssetLoading(path)
+
+ if path:match("%.png$") then
+ assets[i] = RL.LoadTexture(path)
+ elseif path:match("%.wav$") then
+ assets[i] = RL.LoadSound(path)
+ end
+ end
+
+ -- Done loading
+ RL.EndAssetLoading()
+end
+Vector2 = { 1.0, 1.0 } or { x = 1.0, y = 1.0 }Vector2, 2 components
Vector3 = { 1.0, 1.0, 1.0 } or { x = 1.0, y = 1.0, z = 1.0 }Vector3, 3 components
Vector4 = { 1.0, 1.0, 1.0, 1.0 } or { x = 1.0, y = 1.0, z = 1.0, w = 1.0 }Vector4, 4 components
Quaternion = { 0.0, 0.0, 0.0, 1.0 } or { x = 0.0, y = 0.0, z = 0.0, w = 1.0 }Quaternion, 4 components (Vector4 alias)
Matrix = { { 1.0, 0.0, 0.0, 0.0 }, { 0.0, 1.0, 0.0, 0.0 }, { 0.0, 0.0, 1.0, 0.0 }, { 0.0, 0.0, 0.0, 1.0 } }Matrix, 4x4 components, column major, OpenGL style, right-handed. Identity matrix example
Color = { 255, 255, 255, 255 } or { r = 255, g = 255, b = 255, a = 255 }Color, 4 components, R8G8B8A8 (32bit)
Rectangle = { 0.0, 0.0, 1.0, 1.0 } or { x = 0.0, y = 0.0, width = 1.0, height = 1.0 }Rectangle, 4 components
Image = UserdataImage, pixel data stored in CPU memory (RAM)
Texture = UserdataTexture, tex data stored in GPU memory (VRAM)
+textureData = {
+ id = unsigned int, --OpenGL texture id
+ width = int, --Texture base width
+ height = int, --Texture base height
+ mipmaps = int, --Mipmap levels, 1 by default
+ format = int --Data format (PixelFormat type)
+}
+RenderTexture = UserdataRenderTexture, fbo for texture rendering
+renderTextureData = {
+ id = unsigned int, --OpenGL framebuffer object id
+ texture = Texture, --Color buffer attachment texture
+ depth = Texture, --Depth buffer attachment texture
+}
+Font = UserdataFont, font texture and GlyphInfo array data
Camera2D = UserdataCamera2D, defines position/orientation in 2d space
Camera3D = UserdataCamera, defines position/orientation in 3d space
Mesh = UserdataMesh, vertex data and vao/vbo
+meshData = {
+ vertices = Vector3{}, --Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
+ texcoords = Vector2{}, --Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)
+ texcoords2 = Vector2{}, --Vertex texture second coordinates (UV - 2 components per vertex) (shader-location = 5)
+ normals = Vector3{}, --Vertex normals (XYZ - 3 components per vertex) (shader-location = 2)
+ tangents = Vector4{}, --Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4)
+ colors = Color{}, --Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
+ indices = int{} --Vertex indices (in case vertex data comes indexed)
+}
+Material = UserdataMaterial, includes shader and maps
+materialData = {
+ shader = Shader,
+ maps = { --Material maps array (MAX_MATERIAL_MAPS)
+ {
+ MATERIAL_MAP_*, --Example MATERIAL_MAP_ALBEDO
+ {
+ texture = Texture, --Material map texture
+ color = Color, --Material map color
+ value = float, --Material map value
+ },
+ },
+ ...
+ },
+ params = { float, float, float, float } --Material generic parameters (if required)
+}
+Model = UserdataModel, meshes, materials and animation data
Ray = { { 0.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0 } } or { position = { 0.0, 0.0, 0.0 }, direction = { 1.0, 0.0, 0.0 } }Ray, ray for raycasting
RayCollision = { hit = true, distance = 1.0, point = { 0.0, 0.0, 0.0 }, normal = { 0.0, 0.0, 1.0 } }RayCollision, ray hit information
BoundingBox = { { 0.0, 0.0, 0.0 }, { 1.0, 1.0, 1.0 } } or { min = { 0.0, 0.0, 0.0 }, max = { 1.0, 1.0, 1.0 } }BoundingBox
GlyphInfo = UserdataGlyphInfo, font characters glyphs info
+glyphInfoData = {
+ value = int, --Character value (Unicode)
+ offsetX = int, --Character offset X when drawing
+ offsetY = int, --Character offset Y when drawing
+ advanceX = int, --Character advance position X
+ image = Image, --Character image data
+}
+BoneInfo = { name = string[32], parent = int }Bone, skeletal animation bone
Transform = { translation = Vector3, rotation = Quaternion, scale = Vector3 }Transform, vertex transformation data
Wave = UserdataWave, audio wave data
Sound = UserdataSound
SoundAlias = UserdataSoundAlias
Music = UserdataMusic, audio stream, anything longer than ~10 seconds should be streamed
NPatchInfo = { { 0, 0, 24, 24 }, 8, 8, 8, 8, NPATCH_NINE_PATCH } or { source = { 0, 0, 24, 24 }, left = 8, top = 8, right = 8, bottom = 8, layout = NPATCH_NINE_PATCH }NPatchInfo, n-patch layout info
ModelAnimations = UserdataModelAnimation
AutomationEvent = UserdataAutomation event
AutomationEventList = UserdataAutomation event list
Buffer = Buffer userdataData buffer for C primitive types. Type should be one of the Buffer types.
FLAG_VSYNC_HINT = 64Set to try enabling V-Sync on GPU
FLAG_FULLSCREEN_MODE = 2Set to run program in fullscreen
FLAG_WINDOW_RESIZABLE = 4Set to allow resizable window
FLAG_WINDOW_UNDECORATED = 8Set to disable window decoration (frame and buttons)
FLAG_WINDOW_HIDDEN = 128Set to hide window
FLAG_WINDOW_MINIMIZED = 512Set to minimize window (iconify)
FLAG_WINDOW_MAXIMIZED = 1024Set to maximize window (expanded to monitor)
FLAG_WINDOW_UNFOCUSED = 2048Set to window non focused
FLAG_WINDOW_TOPMOST = 4096Set to window always on top
FLAG_WINDOW_ALWAYS_RUN = 256Set to allow windows running while minimized
FLAG_WINDOW_TRANSPARENT = 16Set to allow transparent framebuffer
FLAG_WINDOW_HIGHDPI = 8192Set to support HighDPI
FLAG_WINDOW_MOUSE_PASSTHROUGH = 16384Set to support mouse passthrough, only supported when FLAG_WINDOW_UNDECORATED
FLAG_MSAA_4X_HINT = 32Set to try enabling MSAA 4X
FLAG_INTERLACED_HINT = 65536Set to try enabling interlaced video format (for V3D)
LOG_ALL = 0Display all logs
LOG_TRACE = 1Trace logging, intended for internal use only
LOG_DEBUG = 2Debug logging, used for internal debugging, it should be disabled on release builds
LOG_INFO = 3Info logging, used for program execution info
LOG_WARNING = 4Warning logging, used on recoverable failures
LOG_ERROR = 5Error logging, used on unrecoverable failures
LOG_FATAL = 6Fatal logging, used to abort program: exit(EXIT_FAILURE)
LOG_NONE = 7Disable logging
KEY_NULL = 0Key: NULL, used for no key pressed
KEY_APOSTROPHE = 39Key: '
KEY_COMMA = 44Key: ,
KEY_MINUS = 45Key: -
KEY_PERIOD = 46Key: .
KEY_SLASH = 47Key: /
KEY_ZERO = 48Key: 0
KEY_ONE = 49Key: 1
KEY_TWO = 50Key: 2
KEY_THREE = 51Key: 3
KEY_FOUR = 52Key: 4
KEY_FIVE = 53Key: 5
KEY_SIX = 54Key: 6
KEY_SEVEN = 55Key: 7
KEY_EIGHT = 56Key: 8
KEY_NINE = 57Key: 9
KEY_SEMICOLON = 59Key: ;
KEY_EQUAL = 61Key: =
KEY_A = 65Key: A | a
KEY_B = 66Key: B | b
KEY_C = 67Key: C | c
KEY_D = 68Key: D | d
KEY_E = 69Key: E | e
KEY_F = 70Key: F | f
KEY_G = 71Key: G | g
KEY_H = 72Key: H | h
KEY_I = 73Key: I | i
KEY_J = 74Key: J | j
KEY_K = 75Key: K | k
KEY_L = 76Key: L | l
KEY_M = 77Key: M | m
KEY_N = 78Key: N | n
KEY_O = 79Key: O | o
KEY_P = 80Key: P | p
KEY_Q = 81Key: Q | q
KEY_R = 82Key: R | r
KEY_S = 83Key: S | s
KEY_T = 84Key: T | t
KEY_U = 85Key: U | u
KEY_V = 86Key: V | v
KEY_W = 87Key: W | w
KEY_X = 88Key: X | x
KEY_Y = 89Key: Y | y
KEY_Z = 90Key: Z | z
KEY_LEFT_BRACKET = 91Key: [
KEY_BACKSLASH = 92Key: '\'
KEY_RIGHT_BRACKET = 93Key: ]
KEY_GRAVE = 96Key: `
KEY_SPACE = 32Key: Space
KEY_ESCAPE = 256Key: Esc
KEY_ENTER = 257Key: Enter
KEY_TAB = 258Key: Tab
KEY_BACKSPACE = 259Key: Backspace
KEY_INSERT = 260Key: Ins
KEY_DELETE = 261Key: Del
KEY_RIGHT = 262Key: Cursor right
KEY_LEFT = 263Key: Cursor left
KEY_DOWN = 264Key: Cursor down
KEY_UP = 265Key: Cursor up
KEY_PAGE_UP = 266Key: Page up
KEY_PAGE_DOWN = 267Key: Page down
KEY_HOME = 268Key: Home
KEY_END = 269Key: End
KEY_CAPS_LOCK = 280Key: Caps lock
KEY_SCROLL_LOCK = 281Key: Scroll down
KEY_NUM_LOCK = 282Key: Num lock
KEY_PRINT_SCREEN = 283Key: Print screen
KEY_PAUSE = 284Key: Pause
KEY_F1 = 290Key: F1
KEY_F2 = 291Key: F2
KEY_F3 = 292Key: F3
KEY_F4 = 293Key: F4
KEY_F5 = 294Key: F5
KEY_F6 = 295Key: F6
KEY_F7 = 296Key: F7
KEY_F8 = 297Key: F8
KEY_F9 = 298Key: F9
KEY_F10 = 299Key: F10
KEY_F11 = 300Key: F11
KEY_F12 = 301Key: F12
KEY_LEFT_SHIFT = 340Key: Shift left
KEY_LEFT_CONTROL = 341Key: Control left
KEY_LEFT_ALT = 342Key: Alt left
KEY_LEFT_SUPER = 343Key: Super left
KEY_RIGHT_SHIFT = 344Key: Shift right
KEY_RIGHT_CONTROL = 345Key: Control right
KEY_RIGHT_ALT = 346Key: Alt right
KEY_RIGHT_SUPER = 347Key: Super right
KEY_KB_MENU = 348Key: KB menu
KEY_KP_0 = 320Key: Keypad 0
KEY_KP_1 = 321Key: Keypad 1
KEY_KP_2 = 322Key: Keypad 2
KEY_KP_3 = 323Key: Keypad 3
KEY_KP_4 = 324Key: Keypad 4
KEY_KP_5 = 325Key: Keypad 5
KEY_KP_6 = 326Key: Keypad 6
KEY_KP_7 = 327Key: Keypad 7
KEY_KP_8 = 328Key: Keypad 8
KEY_KP_9 = 329Key: Keypad 9
KEY_KP_DECIMAL = 330Key: Keypad .
KEY_KP_DIVIDE = 331Key: Keypad /
KEY_KP_MULTIPLY = 332Key: Keypad *
KEY_KP_SUBTRACT = 333Key: Keypad -
KEY_KP_ADD = 334Key: Keypad +
KEY_KP_ENTER = 335Key: Keypad Enter
KEY_KP_EQUAL = 336Key: Keypad =
KEY_BACK = 4Key: Android back button
KEY_MENU = 5Key: Android menu button
KEY_VOLUME_UP = 24Key: Android volume up button
KEY_VOLUME_DOWN = 25Key: Android volume down button
MOUSE_BUTTON_LEFT = 0Mouse button left
MOUSE_BUTTON_RIGHT = 1Mouse button right
MOUSE_BUTTON_MIDDLE = 2Mouse button middle (pressed wheel)
MOUSE_BUTTON_SIDE = 3Mouse button side (advanced mouse device)
MOUSE_BUTTON_EXTRA = 4Mouse button extra (advanced mouse device)
MOUSE_BUTTON_FORWARD = 5Mouse button forward (advanced mouse device)
MOUSE_BUTTON_BACK = 6Mouse button back (advanced mouse device)
MOUSE_CURSOR_DEFAULT = 0Default pointer shape
MOUSE_CURSOR_ARROW = 1Arrow shape
MOUSE_CURSOR_IBEAM = 2Text writing cursor shape
MOUSE_CURSOR_CROSSHAIR = 3Cross shape
MOUSE_CURSOR_POINTING_HAND = 4Pointing hand cursor
MOUSE_CURSOR_RESIZE_EW = 5Horizontal resize/move arrow shape
MOUSE_CURSOR_RESIZE_NS = 6Vertical resize/move arrow shape
MOUSE_CURSOR_RESIZE_NWSE = 7Top-left to bottom-right diagonal resize/move arrow shape
MOUSE_CURSOR_RESIZE_NESW = 8The top-right to bottom-left diagonal resize/move arrow shape
MOUSE_CURSOR_RESIZE_ALL = 9The omnidirectional resize/move cursor shape
MOUSE_CURSOR_NOT_ALLOWED = 10The operation-not-allowed shape
GAMEPAD_BUTTON_UNKNOWN = 0Unknown button, just for error checking
GAMEPAD_BUTTON_LEFT_FACE_UP = 1Gamepad left DPAD up button
GAMEPAD_BUTTON_LEFT_FACE_RIGHT = 2Gamepad left DPAD right button
GAMEPAD_BUTTON_LEFT_FACE_DOWN = 3Gamepad left DPAD down button
GAMEPAD_BUTTON_LEFT_FACE_LEFT = 4Gamepad left DPAD left button
GAMEPAD_BUTTON_RIGHT_FACE_UP = 5Gamepad right button up (i.e. PS3: Triangle, Xbox: Y)
GAMEPAD_BUTTON_RIGHT_FACE_RIGHT = 6Gamepad right button right (i.e. PS3: Square, Xbox: X)
GAMEPAD_BUTTON_RIGHT_FACE_DOWN = 7Gamepad right button down (i.e. PS3: Cross, Xbox: A)
GAMEPAD_BUTTON_RIGHT_FACE_LEFT = 8Gamepad right button left (i.e. PS3: Circle, Xbox: B)
GAMEPAD_BUTTON_LEFT_TRIGGER_1 = 9Gamepad top/back trigger left (first), it could be a trailing button
GAMEPAD_BUTTON_LEFT_TRIGGER_2 = 10Gamepad top/back trigger left (second), it could be a trailing button
GAMEPAD_BUTTON_RIGHT_TRIGGER_1 = 11Gamepad top/back trigger right (one), it could be a trailing button
GAMEPAD_BUTTON_RIGHT_TRIGGER_2 = 12Gamepad top/back trigger right (second), it could be a trailing button
GAMEPAD_BUTTON_MIDDLE_LEFT = 13Gamepad center buttons, left one (i.e. PS3: Select)
GAMEPAD_BUTTON_MIDDLE = 14Gamepad center buttons, middle one (i.e. PS3: PS, Xbox: XBOX)
GAMEPAD_BUTTON_MIDDLE_RIGHT = 15Gamepad center buttons, right one (i.e. PS3: Start)
GAMEPAD_BUTTON_LEFT_THUMB = 16Gamepad joystick pressed button left
GAMEPAD_BUTTON_RIGHT_THUMB = 17Gamepad joystick pressed button right
GAMEPAD_AXIS_LEFT_X = 0Gamepad left stick X axis
GAMEPAD_AXIS_LEFT_Y = 1Gamepad left stick Y axis
GAMEPAD_AXIS_RIGHT_X = 2Gamepad right stick X axis
GAMEPAD_AXIS_RIGHT_Y = 3Gamepad right stick Y axis
GAMEPAD_AXIS_LEFT_TRIGGER = 4Gamepad back trigger left, pressure level: [1..-1]
GAMEPAD_AXIS_RIGHT_TRIGGER = 5Gamepad back trigger right, pressure level: [1..-1]
MATERIAL_MAP_ALBEDO = 0Albedo material (same as: MATERIAL_MAP_DIFFUSE)
MATERIAL_MAP_METALNESS = 1Metalness material (same as: MATERIAL_MAP_SPECULAR)
MATERIAL_MAP_NORMAL = 2Normal material
MATERIAL_MAP_ROUGHNESS = 3Roughness material
MATERIAL_MAP_OCCLUSION = 4Ambient occlusion material
MATERIAL_MAP_EMISSION = 5Emission material
MATERIAL_MAP_HEIGHT = 6Heightmap material
MATERIAL_MAP_CUBEMAP = 7Cubemap material (NOTE: Uses GL_TEXTURE_CUBE_MAP)
MATERIAL_MAP_IRRADIANCE = 8Irradiance material (NOTE: Uses GL_TEXTURE_CUBE_MAP)
MATERIAL_MAP_PREFILTER = 9Prefilter material (NOTE: Uses GL_TEXTURE_CUBE_MAP)
MATERIAL_MAP_BRDF = 10Brdf material
MATERIAL_MAP_DIFFUSE = 0Diffuce material (same as: MATERIAL_MAP_ALBEDO)
MATERIAL_MAP_SPECULAR = 1Specular material (same as: MATERIAL_MAP_METALNESS)
SHADER_LOC_VERTEX_POSITION = 0Shader location: vertex attribute: position
SHADER_LOC_VERTEX_TEXCOORD01 = 1Shader location: vertex attribute: texcoord01
SHADER_LOC_VERTEX_TEXCOORD02 = 2Shader location: vertex attribute: texcoord02
SHADER_LOC_VERTEX_NORMAL = 3Shader location: vertex attribute: normal
SHADER_LOC_VERTEX_TANGENT = 4Shader location: vertex attribute: tangent
SHADER_LOC_VERTEX_COLOR = 5Shader location: vertex attribute: color
SHADER_LOC_MATRIX_MVP = 6Shader location: matrix uniform: model-view-projection
SHADER_LOC_MATRIX_VIEW = 7Shader location: matrix uniform: view (camera transform)
SHADER_LOC_MATRIX_PROJECTION = 8Shader location: matrix uniform: projection
SHADER_LOC_MATRIX_MODEL = 9Shader location: matrix uniform: model (transform)
SHADER_LOC_MATRIX_NORMAL = 10Shader location: matrix uniform: normal
SHADER_LOC_VECTOR_VIEW = 11Shader location: vector uniform: view
SHADER_LOC_COLOR_DIFFUSE = 12Shader location: vector uniform: diffuse color
SHADER_LOC_COLOR_SPECULAR = 13Shader location: vector uniform: specular color
SHADER_LOC_COLOR_AMBIENT = 14Shader location: vector uniform: ambient color
SHADER_LOC_MAP_ALBEDO = 15Shader location: sampler2d texture: albedo (same as: SHADER_LOC_MAP_DIFFUSE)
SHADER_LOC_MAP_METALNESS = 16Shader location: sampler2d texture: metalness (same as: SHADER_LOC_MAP_SPECULAR)
SHADER_LOC_MAP_NORMAL = 17Shader location: sampler2d texture: normal
SHADER_LOC_MAP_ROUGHNESS = 18Shader location: sampler2d texture: roughness
SHADER_LOC_MAP_OCCLUSION = 19Shader location: sampler2d texture: occlusion
SHADER_LOC_MAP_EMISSION = 20Shader location: sampler2d texture: emission
SHADER_LOC_MAP_HEIGHT = 21Shader location: sampler2d texture: height
SHADER_LOC_MAP_CUBEMAP = 22Shader location: samplerCube texture: cubemap
SHADER_LOC_MAP_IRRADIANCE = 23Shader location: samplerCube texture: irradiance
SHADER_LOC_MAP_PREFILTER = 24Shader location: samplerCube texture: prefilter
SHADER_LOC_MAP_BRDF = 25Shader location: sampler2d texture: brdf
SHADER_LOC_VERTEX_BONEIDS = 26Shader location: vertex attribute: boneIds
SHADER_LOC_VERTEX_BONEWEIGHTS = 27Shader location: vertex attribute: boneWeights
SHADER_LOC_BONE_MATRICES = 28Shader location: array of matrices uniform: boneMatrices
SHADER_LOC_MAP_DIFFUSE = 15Shader location: sampler2d texture: diffuce (same as: SHADER_LOC_MAP_ALBEDO)
SHADER_LOC_MAP_SPECULAR = 16Shader location: sampler2d texture: specular (same as: SHADER_LOC_MAP_METALNESS)
SHADER_UNIFORM_FLOAT = 0Shader uniform type: float
SHADER_UNIFORM_VEC2 = 1Shader uniform type: vec2 (2 float)
SHADER_UNIFORM_VEC3 = 2Shader uniform type: vec3 (3 float)
SHADER_UNIFORM_VEC4 = 3Shader uniform type: vec4 (4 float)
SHADER_UNIFORM_INT = 4Shader uniform type: int
SHADER_UNIFORM_IVEC2 = 5Shader uniform type: ivec2 (2 int)
SHADER_UNIFORM_IVEC3 = 6Shader uniform type: ivec3 (3 int)
SHADER_UNIFORM_IVEC4 = 7Shader uniform type: ivec4 (4 int)
SHADER_UNIFORM_SAMPLER2D = 8Shader uniform type: sampler2d
SHADER_ATTRIB_FLOAT = 0Shader attribute type: float
SHADER_ATTRIB_VEC2 = 1Shader attribute type: vec2 (2 float)
SHADER_ATTRIB_VEC3 = 2Shader attribute type: vec3 (3 float)
SHADER_ATTRIB_VEC4 = 3Shader attribute type: vec4 (4 float)
PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 18 bit per pixel (no alpha)
PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 28*2 bpp (2 channels)
PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 316 bpp
PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 424 bpp
PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 516 bpp (1 bit alpha)
PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 616 bpp (4 bit alpha)
PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 732 bpp
PIXELFORMAT_UNCOMPRESSED_R32 = 832 bpp (1 channel - float)
PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 932*3 bpp (3 channels - float)
PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 1032*4 bpp (4 channels - float)
PIXELFORMAT_COMPRESSED_DXT1_RGB = 144 bpp (no alpha)
PIXELFORMAT_COMPRESSED_DXT1_RGBA = 154 bpp (1 bit alpha)
PIXELFORMAT_COMPRESSED_DXT3_RGBA = 168 bpp
PIXELFORMAT_COMPRESSED_DXT5_RGBA = 178 bpp
PIXELFORMAT_COMPRESSED_ETC1_RGB = 184 bpp
PIXELFORMAT_COMPRESSED_ETC2_RGB = 194 bpp
PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 208 bpp
PIXELFORMAT_COMPRESSED_PVRT_RGB = 214 bpp
PIXELFORMAT_COMPRESSED_PVRT_RGBA = 224 bpp
PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 238 bpp
PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 242 bpp
TEXTURE_FILTER_POINT = 0No filter, just pixel approximation
TEXTURE_FILTER_BILINEAR = 1Linear filtering
TEXTURE_FILTER_TRILINEAR = 2Trilinear filtering (linear with mipmaps)
TEXTURE_FILTER_ANISOTROPIC_4X = 3Anisotropic filtering 4x
TEXTURE_FILTER_ANISOTROPIC_8X = 4Anisotropic filtering 8x
TEXTURE_FILTER_ANISOTROPIC_16X = 5Anisotropic filtering 16x
TEXTURE_WRAP_REPEAT = 0Repeats texture in tiled mode
TEXTURE_WRAP_CLAMP = 1Clamps texture to edge pixel in tiled mode
TEXTURE_WRAP_MIRROR_REPEAT = 2Mirrors and repeats the texture in tiled mode
TEXTURE_WRAP_MIRROR_CLAMP = 3Mirrors and clamps to border the texture in tiled mode
CUBEMAP_LAYOUT_AUTO_DETECT = 0Automatically detect layout type
CUBEMAP_LAYOUT_LINE_VERTICAL = 1Layout is defined by a vertical line with faces
CUBEMAP_LAYOUT_LINE_HORIZONTAL = 2Layout is defined by a horizontal line with faces
CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR = 3Layout is defined by a 3x4 cross with cubemap faces
CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE = 4Layout is defined by a 4x3 cross with cubemap faces
FONT_DEFAULT = 0Default font generation, anti-aliased
FONT_BITMAP = 1Bitmap font generation, no anti-aliasing
FONT_SDF = 2SDF font generation, requires external shader
BLEND_ALPHA = 0Blend textures considering alpha (default)
BLEND_ADDITIVE = 1Blend textures adding colors
BLEND_MULTIPLIED = 2Blend textures multiplying colors
BLEND_ADD_COLORS = 3Blend textures adding colors (alternative)
BLEND_SUBTRACT_COLORS = 4Blend textures subtracting colors (alternative)
BLEND_ALPHA_PREMULTIPLY = 5Blend premultiplied textures considering alpha
BLEND_CUSTOM = 6Blend textures using custom src/dst factors (use rlSetBlendFactors())
BLEND_CUSTOM_SEPARATE = 7Blend textures using custom rgb/alpha separate src/dst factors (use rlSetBlendFactorsSeparate())
GESTURE_NONE = 0No gesture
GESTURE_TAP = 1Tap gesture
GESTURE_DOUBLETAP = 2Double tap gesture
GESTURE_HOLD = 4Hold gesture
GESTURE_DRAG = 8Drag gesture
GESTURE_SWIPE_RIGHT = 16Swipe right gesture
GESTURE_SWIPE_LEFT = 32Swipe left gesture
GESTURE_SWIPE_UP = 64Swipe up gesture
GESTURE_SWIPE_DOWN = 128Swipe down gesture
GESTURE_PINCH_IN = 256Pinch in gesture
GESTURE_PINCH_OUT = 512Pinch out gesture
CAMERA_CUSTOM = 0Custom camera
CAMERA_FREE = 1Free camera
CAMERA_ORBITAL = 2Orbital camera
CAMERA_FIRST_PERSON = 3First person camera
CAMERA_THIRD_PERSON = 4Third person camera
CAMERA_PERSPECTIVE = 0Perspective projection
CAMERA_ORTHOGRAPHIC = 1Orthographic projection
NPATCH_NINE_PATCH = 0Npatch layout: 3x3 tiles
NPATCH_THREE_PATCH_VERTICAL = 1Npatch layout: 1x3 tiles
NPATCH_THREE_PATCH_HORIZONTAL = 2Npatch layout: 3x1 tiles
PI = 3.1415927410126Pi
EPSILON = 9.9999999747524e-07Epsilon
DEG2RAD = 0.017453292384744Degrees to radians
RAD2DEG = 57.295776367188Radians to degrees
STATE_NORMAL = 0STATE_FOCUSED = 1STATE_PRESSED = 2STATE_DISABLED = 3TEXT_ALIGN_LEFT = 0TEXT_ALIGN_CENTER = 1TEXT_ALIGN_RIGHT = 2TEXT_ALIGN_TOP = 0TEXT_ALIGN_MIDDLE = 1TEXT_ALIGN_BOTTOM = 2TEXT_WRAP_NONE = 0TEXT_WRAP_CHAR = 1TEXT_WRAP_WORD = 2DEFAULT = 0LABEL = 1Used also for: LABELBUTTON
BUTTON = 2TOGGLE = 3Used also for: TOGGLEGROUP
SLIDER = 4Used also for: SLIDERBAR
PROGRESSBAR = 5CHECKBOX = 6COMBOBOX = 7DROPDOWNBOX = 8TEXTBOX = 9Used also for: TEXTBOXMULTI
VALUEBOX = 10SPINNER = 11Uses: BUTTON, VALUEBOX
LISTVIEW = 12COLORPICKER = 13SCROLLBAR = 14STATUSBAR = 15BORDER_COLOR_NORMAL = 0BASE_COLOR_NORMAL = 1TEXT_COLOR_NORMAL = 2BORDER_COLOR_FOCUSED = 3BASE_COLOR_FOCUSED = 4TEXT_COLOR_FOCUSED = 5BORDER_COLOR_PRESSED = 6BASE_COLOR_PRESSED = 7TEXT_COLOR_PRESSED = 8BORDER_COLOR_DISABLED = 9BASE_COLOR_DISABLED = 10TEXT_COLOR_DISABLED = 11BORDER_WIDTH = 12TEXT_PADDING = 13TEXT_ALIGNMENT = 14TEXT_SIZE = 16Text size (glyphs max height)
TEXT_SPACING = 17Text spacing between glyphs
LINE_COLOR = 18Line control color
BACKGROUND_COLOR = 19Background color
TEXT_LINE_SPACING = 20Text spacing between lines
TEXT_ALIGNMENT_VERTICAL = 21Text vertical alignment inside text bounds (after border and padding)
TEXT_WRAP_MODE = 22Text wrap-mode inside text bounds
GROUP_PADDING = 16ToggleGroup separation between toggles
SLIDER_WIDTH = 16Slider size of internal bar
SLIDER_PADDING = 17Slider/SliderBar internal bar padding
PROGRESS_PADDING = 16ProgressBar internal padding
ARROWS_SIZE = 16ARROWS_VISIBLE = 17SCROLL_SLIDER_PADDING = 18(SLIDERBAR, SLIDER_PADDING)
SCROLL_SLIDER_SIZE = 19SCROLL_PADDING = 20SCROLL_SPEED = 21CHECK_PADDING = 16CheckBox internal check padding
COMBO_BUTTON_WIDTH = 16ComboBox right button width
COMBO_BUTTON_SPACING = 17ComboBox button separation
ARROW_PADDING = 16DropdownBox arrow separation from border and items
DROPDOWN_ITEMS_SPACING = 17DropdownBox items separation
TEXT_READONLY = 16TextBox in read-only mode: 0-text editable, 1-text no-editable
SPIN_BUTTON_WIDTH = 16Spinner left/right buttons width
SPIN_BUTTON_SPACING = 17Spinner buttons separation
LIST_ITEMS_HEIGHT = 16ListView items height
LIST_ITEMS_SPACING = 17ListView items separation
SCROLLBAR_WIDTH = 18ListView scrollbar size (usually width)
SCROLLBAR_SIDE = 19ListView scrollbar side (0-left, 1-right)
COLOR_SELECTOR_SIZE = 16HUEBAR_WIDTH = 17ColorPicker right hue bar width
HUEBAR_PADDING = 18ColorPicker right hue bar separation from panel
HUEBAR_SELECTOR_HEIGHT = 19ColorPicker right hue bar selector height
HUEBAR_SELECTOR_OVERFLOW = 20ColorPicker right hue bar selector overflow
ICON_NONE = 0ICON_FOLDER_FILE_OPEN = 1ICON_FILE_SAVE_CLASSIC = 2ICON_FOLDER_OPEN = 3ICON_FOLDER_SAVE = 4ICON_FILE_OPEN = 5ICON_FILE_SAVE = 6ICON_FILE_EXPORT = 7ICON_FILE_ADD = 8ICON_FILE_DELETE = 9ICON_FILETYPE_TEXT = 10ICON_FILETYPE_AUDIO = 11ICON_FILETYPE_IMAGE = 12ICON_FILETYPE_PLAY = 13ICON_FILETYPE_VIDEO = 14ICON_FILETYPE_INFO = 15ICON_FILE_COPY = 16ICON_FILE_CUT = 17ICON_FILE_PASTE = 18ICON_CURSOR_HAND = 19ICON_CURSOR_POINTER = 20ICON_CURSOR_CLASSIC = 21ICON_PENCIL = 22ICON_PENCIL_BIG = 23ICON_BRUSH_CLASSIC = 24ICON_BRUSH_PAINTER = 25ICON_WATER_DROP = 26ICON_COLOR_PICKER = 27ICON_RUBBER = 28ICON_COLOR_BUCKET = 29ICON_TEXT_T = 30ICON_TEXT_A = 31ICON_SCALE = 32ICON_RESIZE = 33ICON_FILTER_POINT = 34ICON_FILTER_BILINEAR = 35ICON_CROP = 36ICON_CROP_ALPHA = 37ICON_SQUARE_TOGGLE = 38ICON_SYMMETRY = 39ICON_SYMMETRY_HORIZONTAL = 40ICON_SYMMETRY_VERTICAL = 41ICON_LENS = 42ICON_LENS_BIG = 43ICON_EYE_ON = 44ICON_EYE_OFF = 45ICON_FILTER_TOP = 46ICON_FILTER = 47ICON_TARGET_POINT = 48ICON_TARGET_SMALL = 49ICON_TARGET_BIG = 50ICON_TARGET_MOVE = 51ICON_CURSOR_MOVE = 52ICON_CURSOR_SCALE = 53ICON_CURSOR_SCALE_RIGHT = 54ICON_CURSOR_SCALE_LEFT = 55ICON_UNDO = 56ICON_REDO = 57ICON_REREDO = 58ICON_MUTATE = 59ICON_ROTATE = 60ICON_REPEAT = 61ICON_SHUFFLE = 62ICON_EMPTYBOX = 63ICON_TARGET = 64ICON_TARGET_SMALL_FILL = 65ICON_TARGET_BIG_FILL = 66ICON_TARGET_MOVE_FILL = 67ICON_CURSOR_MOVE_FILL = 68ICON_CURSOR_SCALE_FILL = 69ICON_CURSOR_SCALE_RIGHT_FILL = 70ICON_CURSOR_SCALE_LEFT_FILL = 71ICON_UNDO_FILL = 72ICON_REDO_FILL = 73ICON_REREDO_FILL = 74ICON_MUTATE_FILL = 75ICON_ROTATE_FILL = 76ICON_REPEAT_FILL = 77ICON_SHUFFLE_FILL = 78ICON_EMPTYBOX_SMALL = 79ICON_BOX = 80ICON_BOX_TOP = 81ICON_BOX_TOP_RIGHT = 82ICON_BOX_RIGHT = 83ICON_BOX_BOTTOM_RIGHT = 84ICON_BOX_BOTTOM = 85ICON_BOX_BOTTOM_LEFT = 86ICON_BOX_LEFT = 87ICON_BOX_TOP_LEFT = 88ICON_BOX_CENTER = 89ICON_BOX_CIRCLE_MASK = 90ICON_POT = 91ICON_ALPHA_MULTIPLY = 92ICON_ALPHA_CLEAR = 93ICON_DITHERING = 94ICON_MIPMAPS = 95ICON_BOX_GRID = 96ICON_GRID = 97ICON_BOX_CORNERS_SMALL = 98ICON_BOX_CORNERS_BIG = 99ICON_FOUR_BOXES = 100ICON_GRID_FILL = 101ICON_BOX_MULTISIZE = 102ICON_ZOOM_SMALL = 103ICON_ZOOM_MEDIUM = 104ICON_ZOOM_BIG = 105ICON_ZOOM_ALL = 106ICON_ZOOM_CENTER = 107ICON_BOX_DOTS_SMALL = 108ICON_BOX_DOTS_BIG = 109ICON_BOX_CONCENTRIC = 110ICON_BOX_GRID_BIG = 111ICON_OK_TICK = 112ICON_CROSS = 113ICON_ARROW_LEFT = 114ICON_ARROW_RIGHT = 115ICON_ARROW_DOWN = 116ICON_ARROW_UP = 117ICON_ARROW_LEFT_FILL = 118ICON_ARROW_RIGHT_FILL = 119ICON_ARROW_DOWN_FILL = 120ICON_ARROW_UP_FILL = 121ICON_AUDIO = 122ICON_FX = 123ICON_WAVE = 124ICON_WAVE_SINUS = 125ICON_WAVE_SQUARE = 126ICON_WAVE_TRIANGULAR = 127ICON_CROSS_SMALL = 128ICON_PLAYER_PREVIOUS = 129ICON_PLAYER_PLAY_BACK = 130ICON_PLAYER_PLAY = 131ICON_PLAYER_PAUSE = 132ICON_PLAYER_STOP = 133ICON_PLAYER_NEXT = 134ICON_PLAYER_RECORD = 135ICON_MAGNET = 136ICON_LOCK_CLOSE = 137ICON_LOCK_OPEN = 138ICON_CLOCK = 139ICON_TOOLS = 140ICON_GEAR = 141ICON_GEAR_BIG = 142ICON_BIN = 143ICON_HAND_POINTER = 144ICON_LASER = 145ICON_COIN = 146ICON_EXPLOSION = 147ICON_1UP = 148ICON_PLAYER = 149ICON_PLAYER_JUMP = 150ICON_KEY = 151ICON_DEMON = 152ICON_TEXT_POPUP = 153ICON_GEAR_EX = 154ICON_CRACK = 155ICON_CRACK_POINTS = 156ICON_STAR = 157ICON_DOOR = 158ICON_EXIT = 159ICON_MODE_2D = 160ICON_MODE_3D = 161ICON_CUBE = 162ICON_CUBE_FACE_TOP = 163ICON_CUBE_FACE_LEFT = 164ICON_CUBE_FACE_FRONT = 165ICON_CUBE_FACE_BOTTOM = 166ICON_CUBE_FACE_RIGHT = 167ICON_CUBE_FACE_BACK = 168ICON_CAMERA = 169ICON_SPECIAL = 170ICON_LINK_NET = 171ICON_LINK_BOXES = 172ICON_LINK_MULTI = 173ICON_LINK = 174ICON_LINK_BROKE = 175ICON_TEXT_NOTES = 176ICON_NOTEBOOK = 177ICON_SUITCASE = 178ICON_SUITCASE_ZIP = 179ICON_MAILBOX = 180ICON_MONITOR = 181ICON_PRINTER = 182ICON_PHOTO_CAMERA = 183ICON_PHOTO_CAMERA_FLASH = 184ICON_HOUSE = 185ICON_HEART = 186ICON_CORNER = 187ICON_VERTICAL_BARS = 188ICON_VERTICAL_BARS_FILL = 189ICON_LIFE_BARS = 190ICON_INFO = 191ICON_CROSSLINE = 192ICON_HELP = 193ICON_FILETYPE_ALPHA = 194ICON_FILETYPE_HOME = 195ICON_LAYERS_VISIBLE = 196ICON_LAYERS = 197ICON_WINDOW = 198ICON_HIDPI = 199ICON_FILETYPE_BINARY = 200ICON_HEX = 201ICON_SHIELD = 202ICON_FILE_NEW = 203ICON_FOLDER_ADD = 204ICON_ALARM = 205ICON_CPU = 206ICON_ROM = 207ICON_STEP_OVER = 208ICON_STEP_INTO = 209ICON_STEP_OUT = 210ICON_RESTART = 211ICON_BREAKPOINT_ON = 212ICON_BREAKPOINT_OFF = 213ICON_BURGER_MENU = 214ICON_CASE_SENSITIVE = 215ICON_REG_EXP = 216ICON_FOLDER = 217ICON_FILE = 218ICON_SAND_TIMER = 219LIGHT_DIRECTIONAL = 0Directional light
LIGHT_POINT = 1Point light
RL_DEFAULT_BATCH_BUFFER_ELEMENTS = 8192Default internal render batch elements limits
RL_DEFAULT_BATCH_BUFFERS = 1Default number of batch buffers (multi-buffering)
RL_DEFAULT_BATCH_DRAWCALLS = 256Default number of batch draw calls (by state changes: mode, texture)
RL_DEFAULT_BATCH_MAX_TEXTURE_UNITS = 4Maximum number of textures units that can be activated on batch drawing (SetShaderValueTexture())
RL_MAX_MATRIX_STACK_SIZE = 32Maximum size of internal Matrix stack
RL_MAX_SHADER_LOCATIONS = 32Maximum number of shader locations supported
RL_CULL_DISTANCE_NEAR = 0.01Default projection matrix near cull distance
RL_CULL_DISTANCE_FAR = 1000Default projection matrix far cull distance
RL_TEXTURE_WRAP_S = 10242GL_TEXTURE_WRAP_S
RL_TEXTURE_WRAP_T = 10243GL_TEXTURE_WRAP_T
RL_TEXTURE_MAG_FILTER = 10240GL_TEXTURE_MAG_FILTER
RL_TEXTURE_MIN_FILTER = 10241GL_TEXTURE_MIN_FILTER
RL_TEXTURE_FILTER_NEAREST = 9728GL_NEAREST
RL_TEXTURE_FILTER_LINEAR = 9729GL_LINEAR
RL_TEXTURE_FILTER_MIP_NEAREST = 9984GL_NEAREST_MIPMAP_NEAREST
RL_TEXTURE_FILTER_NEAREST_MIP_LINEAR = 9986GL_NEAREST_MIPMAP_LINEAR
RL_TEXTURE_FILTER_LINEAR_MIP_NEAREST = 9985GL_LINEAR_MIPMAP_NEAREST
RL_TEXTURE_FILTER_MIP_LINEAR = 9987GL_LINEAR_MIPMAP_LINEAR
RL_TEXTURE_FILTER_ANISOTROPIC = 12288Anisotropic filter (custom identifier)
RL_TEXTURE_MIPMAP_BIAS_RATIO = 16384Texture mipmap bias, percentage ratio (custom identifier)
RL_TEXTURE_WRAP_REPEAT = 10497GL_REPEAT
RL_TEXTURE_WRAP_CLAMP = 33071GL_CLAMP_TO_EDGE
RL_TEXTURE_WRAP_MIRROR_REPEAT = 33648GL_MIRRORED_REPEAT
RL_TEXTURE_WRAP_MIRROR_CLAMP = 34626GL_MIRROR_CLAMP_EXT
RL_MODELVIEW = 5888GL_MODELVIEW
RL_PROJECTION = 5889GL_PROJECTION
RL_TEXTURE = 5890GL_TEXTURE
RL_LINES = 1GL_LINES
RL_TRIANGLES = 4GL_TRIANGLES
RL_QUADS = 7GL_QUADS
RL_UNSIGNED_BYTE = 5121GL_UNSIGNED_BYTE
RL_FLOAT = 5126GL_FLOAT
RL_STREAM_DRAW = 35040GL_STREAM_DRAW
RL_STREAM_READ = 35041GL_STREAM_READ
RL_STREAM_COPY = 35042GL_STREAM_COPY
RL_STATIC_DRAW = 35044GL_STATIC_DRAW
RL_STATIC_READ = 35045GL_STATIC_READ
RL_STATIC_COPY = 35046GL_STATIC_COPY
RL_DYNAMIC_DRAW = 35048GL_DYNAMIC_DRAW
RL_DYNAMIC_READ = 35049GL_DYNAMIC_READ
RL_DYNAMIC_COPY = 35050GL_DYNAMIC_COPY
RL_FRAGMENT_SHADER = 35632GL_FRAGMENT_SHADER
RL_VERTEX_SHADER = 35633GL_VERTEX_SHADER
RL_COMPUTE_SHADER = 37305GL_COMPUTE_SHADER
RL_ZERO = 0GL_ZERO
RL_ONE = 1GL_ONE
RL_SRC_COLOR = 768GL_SRC_COLOR
RL_ONE_MINUS_SRC_COLOR = 769GL_ONE_MINUS_SRC_COLOR
RL_SRC_ALPHA = 770GL_SRC_ALPHA
RL_ONE_MINUS_SRC_ALPHA = 771GL_ONE_MINUS_SRC_ALPHA
RL_DST_ALPHA = 772GL_DST_ALPHA
RL_ONE_MINUS_DST_ALPHA = 773GL_ONE_MINUS_DST_ALPHA
RL_DST_COLOR = 774GL_DST_COLOR
RL_ONE_MINUS_DST_COLOR = 775GL_ONE_MINUS_DST_COLOR
RL_SRC_ALPHA_SATURATE = 776GL_SRC_ALPHA_SATURATE
RL_CONSTANT_COLOR = 32769GL_CONSTANT_COLOR
RL_ONE_MINUS_CONSTANT_COLOR = 32770GL_ONE_MINUS_CONSTANT_COLOR
RL_CONSTANT_ALPHA = 32771GL_CONSTANT_ALPHA
RL_ONE_MINUS_CONSTANT_ALPHA = 32772GL_ONE_MINUS_CONSTANT_ALPHA
RL_FUNC_ADD = 32774GL_FUNC_ADD
RL_MIN = 32775GL_MIN
RL_MAX = 32776GL_MAX
RL_FUNC_SUBTRACT = 32778GL_FUNC_SUBTRACT
RL_FUNC_REVERSE_SUBTRACT = 32779GL_FUNC_REVERSE_SUBTRACT
RL_BLEND_EQUATION = 32777GL_BLEND_EQUATION
RL_BLEND_EQUATION_RGB = 32777GL_BLEND_EQUATION_RGB // (Same as BLEND_EQUATION)
RL_BLEND_EQUATION_ALPHA = 34877GL_BLEND_EQUATION_ALPHA
RL_BLEND_DST_RGB = 32968GL_BLEND_DST_RGB
RL_BLEND_SRC_RGB = 32969GL_BLEND_SRC_RGB
RL_BLEND_DST_ALPHA = 32970GL_BLEND_DST_ALPHA
RL_BLEND_SRC_ALPHA = 32971GL_BLEND_SRC_ALPHA
RL_BLEND_COLOR = 32773GL_BLEND_COLOR
RL_READ_FRAMEBUFFER = 36008GL_READ_FRAMEBUFFER
RL_DRAW_FRAMEBUFFER = 36009GL_DRAW_FRAMEBUFFER
RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION = 0RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD = 1RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL = 2RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR = 3RL_DEFAULT_SHADER_ATTRIB_LOCATION_TANGENT = 4RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD2 = 5RL_DEFAULT_SHADER_ATTRIB_LOCATION_INDICES = 6RL_OPENGL_11 = 1OpenGL 1.1
RL_OPENGL_21 = 2OpenGL 2.1 (GLSL 120)
RL_OPENGL_33 = 3OpenGL 3.3 (GLSL 330)
RL_OPENGL_43 = 4OpenGL 4.3 (using GLSL 330)
RL_OPENGL_ES_20 = 5OpenGL ES 2.0 (GLSL 100)
RL_ATTACHMENT_COLOR_CHANNEL0 = 0Framebuffer attachment type: color 0
RL_ATTACHMENT_COLOR_CHANNEL1 = 1Framebuffer attachment type: color 1
RL_ATTACHMENT_COLOR_CHANNEL2 = 2Framebuffer attachment type: color 2
RL_ATTACHMENT_COLOR_CHANNEL3 = 3Framebuffer attachment type: color 3
RL_ATTACHMENT_COLOR_CHANNEL4 = 4Framebuffer attachment type: color 4
RL_ATTACHMENT_COLOR_CHANNEL5 = 5Framebuffer attachment type: color 5
RL_ATTACHMENT_COLOR_CHANNEL6 = 6Framebuffer attachment type: color 6
RL_ATTACHMENT_COLOR_CHANNEL7 = 7Framebuffer attachment type: color 7
RL_ATTACHMENT_DEPTH = 100Framebuffer attachment type: depth
RL_ATTACHMENT_STENCIL = 200Framebuffer attachment type: stencil
RL_ATTACHMENT_CUBEMAP_POSITIVE_X = 0Framebuffer texture attachment type: cubemap, +X side
RL_ATTACHMENT_CUBEMAP_NEGATIVE_X = 1Framebuffer texture attachment type: cubemap, -X side
RL_ATTACHMENT_CUBEMAP_POSITIVE_Y = 2Framebuffer texture attachment type: cubemap, +Y side
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y = 3Framebuffer texture attachment type: cubemap, -Y side
RL_ATTACHMENT_CUBEMAP_POSITIVE_Z = 4Framebuffer texture attachment type: cubemap, +Z side
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z = 5Framebuffer texture attachment type: cubemap, -Z side
RL_ATTACHMENT_TEXTURE2D = 100Framebuffer texture attachment type: texture2d
RL_ATTACHMENT_RENDERBUFFER = 200Framebuffer texture attachment type: renderbuffer
RL_CULL_FACE_FRONT = 0RL_CULL_FACE_BACK = 1GL_COLOR_BUFFER_BIT = 16384GL_DEPTH_BUFFER_BIT = 256GL_STENCIL_BUFFER_BIT = 1024GL_NEAREST = 9728GL_LINEAR = 9729GL_BLEND = 3042If enabled, blend the computed fragment color values with the values in the color buffers. See glBlendFunc
GL_CULL_FACE = 2884If enabled, cull polygons based on their winding in window coordinates. See glCullFace
GL_DEPTH_TEST = 2929If enabled, do depth comparisons and update the depth buffer. Note that even if the depth buffer exists and the depth mask is non-zero, the depth buffer is not updated if the depth test is disabled. See glDepthFunc and glDepthRangef
GL_DITHER = 3024If enabled, dither color components or indices before they are written to the color buffer
GL_POLYGON_OFFSET_FILL = 32823If enabled, an offset is added to depth values of a polygon's fragments produced by rasterization. See glPolygonOffset
GL_POLYGON_OFFSET_LINE = 10754GL_POLYGON_OFFSET_POINT = 10753GL_SAMPLE_ALPHA_TO_COVERAGE = 32926If enabled, compute a temporary coverage value where each bit is determined by the alpha value at the corresponding sample location. The temporary coverage value is then ANDed with the fragment coverage value
GL_SAMPLE_COVERAGE = 32928If enabled, the fragment's coverage is ANDed with the temporary coverage value. If GL_SAMPLE_COVERAGE_INVERT is set to GL_TRUE, invert the coverage value. See glSampleCoverage
GL_SCISSOR_TEST = 3089If enabled, discard fragments that are outside the scissor rectangle. See glScissor
GL_STENCIL_TEST = 2960If enabled, do stencil testing and update the stencil buffer. See glStencilFunc and glStencilOp
GL_NEVER = 512Always fails
GL_LESS = 513Passes if ( ref & mask ) < ( stencil & mask )
GL_LEQUAL = 515Passes if ( ref & mask ) <= ( stencil & mask )
GL_GREATER = 516Passes if ( ref & mask ) > ( stencil & mask )
GL_GEQUAL = 518Passes if ( ref & mask ) >= ( stencil & mask )
GL_EQUAL = 514Passes if ( ref & mask ) = ( stencil & mask )
GL_NOTEQUAL = 517Passes if ( ref & mask ) != ( stencil & mask )
GL_ALWAYS = 519Always passes
GL_FRONT = 1028GL_BACK = 1029GL_FRONT_AND_BACK = 1032GL_KEEP = 7680Keeps the current value
GL_ZERO = 0Sets the stencil buffer value to 0
GL_REPLACE = 7681Sets the stencil buffer value to ref, as specified by glStencilFunc
GL_INCR = 7682Increments the current stencil buffer value. Clamps to the maximum representable unsigned value
GL_INCR_WRAP = 34055Increments the current stencil buffer value. Wraps stencil buffer value to zero when incrementing the maximum representable unsigned value
GL_DECR = 7683Decrements the current stencil buffer value. Clamps to 0
GL_DECR_WRAP = 34056Decrements the current stencil buffer value. Wraps stencil buffer value to the maximum representable unsigned value when decrementing a stencil buffer value of zero
GL_INVERT = 5386Bitwise inverts the current stencil buffer value
GL_VENDOR = 7936Returns the company responsible for this GL implementation. This name does not change from release to release
GL_RENDERER = 7937Returns the name of the renderer. This name is typically specific to a particular configuration of a hardware platform. It does not change from release to release
GL_VERSION = 7938Returns a version or release number of the form OpenGLES
GL_SHADING_LANGUAGE_VERSION = 35724Returns a version or release number for the shading language of the form OpenGLESGLSLES
GL_EXTENSIONS = 7939Returns a space-separated list of supported extensions to GL
BUFFER_UNSIGNED_CHAR = 0C type unsigned char
BUFFER_UNSIGNED_SHORT = 1C type unsigned short
BUFFER_UNSIGNED_INT = 2C type unsigned int
BUFFER_UNSIGNED_LONG = 3C type unsigned long
BUFFER_CHAR = 4C type char
BUFFER_SHORT = 5C type short
BUFFER_INT = 6C type int
BUFFER_LONG = 7C type long
BUFFER_FLOAT = 8C type float
BUFFER_DOUBLE = 9C type double
GLFW_KEY_UNKNOWN = -1Key: Unknown
GLFW_RELEASE = 0The key or mouse button was released
GLFW_PRESS = 1The key or mouse button was pressed
GLFW_REPEAT = 2The key was held down until it repeated
GLFW_CONNECTED = 262145Joystick connected
GLFW_DISCONNECTED = 262146Joystick disconnected
GLFW_WINDOW_SIZE_EVENT = 0GLFW event window size changed
GLFW_WINDOW_MAXIMIZE_EVENT = 1GLFW event window maximize
GLFW_WINDOW_ICONYFY_EVENT = 2GLFW event window iconify
GLFW_WINDOW_FOCUS_EVENT = 3GLFW event window focus
GLFW_WINDOW_DROP_EVENT = 4GLFW event window drop
GLFW_KEY_EVENT = 5GLFW event keyboard key
GLFW_CHAR_EVENT = 6GLFW event Unicode character
GLFW_MOUSE_BUTTON_EVENT = 7GLFW event mouse button
GLFW_MOUSE_CURSOR_POS_EVENT = 8GLFW event cursor position
GLFW_MOUSE_SCROLL_EVENT = 9GLFW event mouse scroll
GLFW_CURSOR_ENTER_EVENT = 10GLFW event cursor enter/leave
GLFW_JOYSTICK_EVENT = 11GLFW event joystick
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
RL.WindowShouldClose()Check if application should close (KEY_ESCAPE pressed or windows close icon clicked). Note! Not needed unless you want to make custom main loop
state = RL.IsWindowReady()Check if window has been initialized successfully
+state = RL.IsWindowFullscreen()Check if window is currently fullscreen
+state = RL.IsWindowHidden()Check if window is currently hidden (only PLATFORM_DESKTOP)
+state = RL.IsWindowMinimized()Check if window is currently minimized (only PLATFORM_DESKTOP)
+state = RL.IsWindowMaximized()Check if window is currently maximized (only PLATFORM_DESKTOP)
+state = RL.IsWindowFocused()Check if window is currently focused (only PLATFORM_DESKTOP)
+resized = RL.IsWindowResized()Check if window has been resized from last frame
+state = RL.IsWindowState( int flag )Check if one specific window flag is enabled (FLAG_FULLSCREEN_MODE, FLAG_WINDOW_RESIZABLE...)
+RL.SetWindowState( int flag )Set window configuration state using flags (FLAG_FULLSCREEN_MODE, FLAG_WINDOW_RESIZABLE...)
resized = RL.ClearWindowState( int flag )Clear window configuration state flags (FLAG_FULLSCREEN_MODE, FLAG_WINDOW_RESIZABLE...)
+RL.ToggleFullscreen()Toggle window state: fullscreen/windowed, resizes monitor to match window resolution
RL.ToggleBorderlessWindowed()Toggle window state: borderless windowed, resizes window to match monitor resolution
RL.MaximizeWindow()Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
RL.MinimizeWindow()Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
RL.RestoreWindow()Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
RL.SetWindowIcon( Image image )Set icon for window (Only PLATFORM_DESKTOP)
RL.SetWindowIcons( Image{} images )Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)
RL.SetWindowTitle( string title )Set title for window (only PLATFORM_DESKTOP and PLATFORM_WEB)
RL.SetWindowPosition( Vector2 pos )Set window position on screen
RL.SetWindowMonitor( int monitor )Set monitor for the current window
RL.SetWindowMinSize( Vector2 size )Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
RL.SetWindowMaxSize( Vector2 size )Set window maximum dimensions (for FLAG_WINDOW_RESIZABLE)
RL.SetWindowSize( Vector2 size )Set window dimensions
RL.SetWindowOpacity( float opacity )Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)
RL.SetWindowFocused()Set window focused (only PLATFORM_DESKTOP)
windowHandle = RL.GetWindowHandle()Get native window handle. Return as lightuserdata
+size = RL.GetScreenSize()Get screen size
+size = RL.GetRenderSize()Get render size
+count = RL.GetMonitorCount()Get number of connected monitors
+monitor = RL.GetCurrentMonitor()Get current connected monitor
+position = RL.GetMonitorPosition( int monitor )Get specified monitor position
+size = RL.GetMonitorSize( int monitor )Get specified monitor size
+size = RL.GetMonitorPhysicalSize( int monitor )Get specified monitor physical size in millimetres
+refreshRate = RL.GetMonitorRefreshRate( int monitor )Get specified monitor refresh rate
+position = RL.GetWindowPosition()Get window position on monitor
+dpi = RL.GetWindowScaleDPI()Get window scale DPI factor
+name = RL.GetMonitorName( int monitor )Get the human-readable, UTF-8 encoded name of the specified monitor
+RL.SetClipboardText( string text )Set clipboard text content
text = RL.GetClipboardText()Get clipboard text content
+image = RL.GetClipboardImage()Get clipboard image content
+RL.EnableEventWaiting()Enable waiting for events on EndDrawing(), no automatic event polling
RL.DisableEventWaiting()Disable waiting for events on EndDrawing(), automatic events polling
RL.ShowCursor()Shows cursor
RL.HideCursor()Hides cursor
hidden = RL.IsCursorHidden()Check if cursor is not visible
+RL.EnableCursor()Enables cursor (unlock cursor)
RL.DisableCursor()Disables cursor (lock cursor)
onSreen = RL.IsCursorOnScreen()Check if cursor is on the screen
+RL.ClearBackground( Color color )Set background color (framebuffer clear color)
RL.BeginDrawing()Setup canvas (framebuffer) to start drawing
RL.EndDrawing()End canvas drawing and swap buffers (double buffering)
RL.BeginMode2D( camera2D camera )Begin 2D mode with custom camera (2D)
RL.EndMode2D()Ends 2D mode with custom camera
RL.BeginMode3D( camera3D camera )Begin 3D mode with custom camera (3D)
RL.EndMode3D()Ends 3D mode and returns to default 2D orthographic mode
RL.BeginTextureMode( RenderTexture target )Begin drawing to render texture
RL.EndTextureMode()Ends drawing to render texture
RL.BeginShaderMode( Shader shader )Begin custom shader drawing
RL.EndShaderMode()End custom shader drawing (use default shader)
RL.BeginBlendMode( int mode )Begin blending mode (BLEND_ALPHA, BLEND_ADDITIVE, BLEND_MULTIPLIED...)
RL.EndBlendMode()End blending mode (reset to default: BLEND_ALPHA)
RL.BeginScissorMode( Rectangle rectange )Begin scissor mode (define screen area for following drawing)
RL.EndScissorMode()End scissor mode
shader = RL.LoadShader( string|nil vsFileName, string|nil fsFileName )Load shader from files and bind default locations. NOTE: Set nil if no shader
+shader = RL.LoadShaderFromMemory( string|nil vsCode, string|nil fsCode )Load shader from code strings and bind default locations NOTE: Set nil if no shader
+isValid = RL.IsShaderValid( Shader shader )Check if a shader is valid (loaded on GPU)
+shaderId = RL.GetShaderId( Shader shader )Get shader program id
+location = RL.GetShaderLocation( Shader shader, string uniformName )Get shader uniform location
+location = RL.GetShaderLocationAttrib( Shader shader, string attribName )Get shader attribute location
+RL.SetShaderLocationIndex( Shader shader, int shaderLocationIndex, int location )Set shader location index
location = RL.GetShaderLocationIndex( Shader shader, int shaderLocationIndex )Get shader location index
+RL.SetShaderValueMatrix( Shader shader, int locIndex, Matrix mat )Set shader uniform value (matrix 4x4)
RL.SetShaderValueTexture( Shader shader, int locIndex, Texture texture )Set shader uniform value for texture (sampler2d)
RL.SetShaderValue( Shader shader, int locIndex, number{} values, int uniformType )Set shader uniform value NOTE: Even one value should be in table
RL.SetShaderValueV( Shader shader, int locIndex, number{} values, int uniformType, int count )Set shader uniform value vector NOTE: Even one value should be in table
RL.SetShaderValueWithBuffer( Shader shader, int locIndex, Buffer values, int uniformType )Set shader uniform value using Buffer object
RL.SetShaderValueVWithBuffer( Shader shader, int locIndex, Buffer values, int uniformType, int count )Set shader uniform value vector using Buffer object
RL.UnloadShader( Shader shader )Unload shader from GPU memory (VRAM)
ray = RL.GetScreenToWorldRay( Vector2 mousePosition, Camera3D camera )Get a ray trace from screen position (i.e mouse)
+ray = RL.GetScreenToWorldRayEx( Vector2 mousePosition, Camera3D camera, Vector2 size )Get a ray trace from screen position (i.e mouse) in a viewport
+position = RL.GetWorldToScreen( Vector3 position, Camera3D camera )Get the screen space position for a 3d world space position
+position = RL.GetWorldToScreenEx( Vector3 position, Camera3D camera, Vector2 size )Get size position for a 3d world space position
+position = RL.GetWorldToScreen2D( Vector2 position, Camera2D camera )Get the screen space position for a 2d camera world space position
+position = RL.GetScreenToWorld2D( Vector2 position, Camera2D camera )Get the world space position for a 2d camera screen space position
+matrix = RL.GetCameraMatrix( Camera3D camera )Get camera transform matrix (view matrix)
+matrix = RL.GetCameraMatrix2D( Camera2D camera )Get camera 2d transform matrix
+RL.SetTargetFPS( int fps )Set target FPS (maximum)
delta = RL.GetFrameTime()Get time in seconds for last frame drawn (Delta time)
+time = RL.GetTime()Get elapsed time in seconds since InitWindow()
+FPS = RL.GetFPS()Get current FPS
+RL.SwapScreenBuffer()Swap back buffer with front buffer (screen drawing)
RL.PollInputEvents()Register all input events
RL.WaitTime( number seconds )Wait for some time (halt program execution)
RL.SetRandomSeed( int seed )Set the seed for the random number generator
time = RL.GetRandomValue( int min, int max )Get a random value between min and max (both included)
+sequence = RL.LoadRandomSequence( int count, int min, int max )Load random values sequence, no values repeated
+RL.TakeScreenshot( string fileName )Takes a screenshot of current screen (filename extension defines format)
RL.SetConfigFlags( int flags )Setup init configuration flags (view FLAGS)
RL.TraceLog( int logLevel, string text )Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...)
RL.SetTraceLogLevel( int logLevel )Set the current threshold (minimum) log level
RL.SetLogLevelInvalid( int logLevel )Set the log level for bad function calls and invalid data formats.
logLevel = RL.GetLogLevelInvalid()Get the log level for bad function calls and invalid data formats.
+RL.OpenURL( string url )Open URL with default system browser (if available)
enabled = RL.IsGCUnloadEnabled()Check if Lua garbage collection is set to unload object data
+RL.SetGCUnload( bool enabled )Set Lua garbage collection to unload object data
platform = RL.GetPlatform()Get platform. Returns "Windows", "Linux", "FreeBSD", "OpenBSD", "Apple" or "Emscripten"
+buffer = RL.LoadFileData( string fileName )Load file data as byte array (read). Buffer type is BUFFER_UNSIGNED_CHAR
+success = RL.SaveFileData( string fileName, buffer Buffer )Save data to file from byte array (write), returns true on success
+success = RL.ExportDataAsCode( Buffer buffer, string fileName )Export data to code (.h), returns true on success
+text = RL.LoadFileText( string fileName )Load text data from file (read)
+success = RL.SaveFileText( string fileName, string text )Save text data to file (write), returns true on success
+path = RL.GetBasePath()Return game directory (where main.lua is located)
+fileExists = RL.FileExists( string fileName )Check if file exists
+dirExists = RL.DirectoryExists( string dirPath )Check if a directory path exists
+hasFileExtension = RL.IsFileExtension( string fileName, string ext )Check file extension (Including point: .png, .wav)
+length = RL.GetFileLength( string fileName )Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h)
+extension = RL.GetFileExtension( string fileName )Get pointer to extension for a filename string (Includes dot: '.png')
+fileName = RL.GetFileName( string filePath )Get pointer to filename for a path string
+fileName = RL.GetFileNameWithoutExt( string filePath )Get filename string without extension (Uses static string)
+filePath = RL.GetDirectoryPath( string filePath )Get full path for a given fileName with path (Uses static string)
+directory = RL.GetPrevDirectoryPath( string dirPath )Get previous directory path for a given path (Uses static string)
+directory = RL.GetWorkingDirectory()Get current working directory (Uses static string)
+directory = RL.GetApplicationDirectory()Get the directory of the running application (uses static string)
+success = RL.MakeDirectory( string dirPath )Create directories (including full path requested), returns 0 on success
+success = RL.ChangeDirectory( string directory )Change working directory, return true on success
+isFile = RL.IsPathFile( string path )Check if a given path is a file or a directory
+isValid = RL.IsFileNameValid( string fileName )Check if fileName is valid for the platform/OS
+fileNames = RL.LoadDirectoryFiles( string dirPath )Load directory filepaths
+fileNames = RL.LoadDirectoryFilesEx( string basePath, string|nil filter, bool scanSubdirs )Load directory filepaths with extension filtering and recursive directory scan
+iSFileDropped = RL.IsFileDropped()Check if a file has been dropped into window
+files = RL.LoadDroppedFiles()Load dropped filepaths
+time = RL.GetFileModTime( string fileName )Get file modification time (Last write time)
+compData = RL.CompressData( Buffer buffer )Compress data (DEFLATE algorithm)
+decompData = RL.DecompressData( Buffer compData )Decompress data (DEFLATE algorithm).
+encodedData, outputSize = RL.EncodeDataBase64( string data )Encode data to Base64 string
+decodedData, outputSize = RL.DecodeDataBase64( string data )Decode Base64 string data
+code = RL.ComputeCRC32( Buffer data )Compute CRC32 hash code.
+code = RL.ComputeMD5( Buffer data )Compute MD5 hash code, returns static int[4] (16 bytes).
+code = RL.ComputeSHA1( Buffer data )Compute SHA1 hash code, returns static int[5] (20 bytes).
+eventList = RL.LoadAutomationEventList( string|nil fileName )Load automation events list from file, nil for empty list, capacity = MAX_AUTOMATION_EVENTS
+RL.UnloadAutomationEventList( AutomationEventList list )Unload automation events list from file
success = RL.ExportAutomationEventList( string fileName )Export automation events list as text file
+RL.SetAutomationEventList( AutomationEventList list )Set automation event list to record to
RL.SetAutomationEventBaseFrame( int frame )Set automation event internal base frame to start recording
RL.StartAutomationEventRecording()Start recording automation events (AutomationEventList must be set)
RL.StopAutomationEventRecording()Stop recording automation events
RL.PlayAutomationEvent( AutomationEvent event )Play a recorded automation event
capacity = RL.GetAutomationEventListCapacity( AutomationEventList list )Get automation event list capacity
+count = RL.GetAutomationEventListCount( AutomationEventList list )Get automation event list count
+event = RL.GetAutomationEvent( AutomationEventList list, int index )Get automation event from automation event list. Return as lightuserdata
+frame = RL.GetAutomationEventFrame( AutomationEvent event )Get automation event frame
+type = RL.GetAutomationEventType( AutomationEvent event )Get automation event type
+params = RL.GetAutomationEventParams( AutomationEvent event )Get automation event params
+pressed = RL.IsKeyPressed( int key )Detect if a key has been pressed once
+pressed = RL.IsKeyPressedRepeat( int key )Check if a key has been pressed again (Only PLATFORM_DESKTOP)
+pressed = RL.IsKeyDown( int key )Detect if a key is being pressed
+released = RL.IsKeyReleased( int key )Detect if a key has been released once
+released = RL.IsKeyUp( int key )Check if a key is NOT being pressed
+keycode = RL.GetKeyPressed()Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty
+unicode = RL.GetCharPressed()Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty
+RL.SetExitKey( int key )Set a custom key to exit program (default is ESC)
available = RL.IsGamepadAvailable( int gamepad )Detect if a gamepad is available
+name = RL.GetGamepadName( int gamepad )Return gamepad internal name id
+pressed = RL.IsGamepadButtonPressed( int gamepad, int button )Detect if a gamepad button has been pressed once
+pressed = RL.IsGamepadButtonDown( int gamepad, int button )Detect if a gamepad button is being pressed
+released = RL.IsGamepadButtonReleased( int gamepad, int button )Detect if a gamepad button has been released once
+notPressed = RL.IsGamepadButtonUp( int gamepad, int button )Check if a gamepad button is NOT being pressed
+button = RL.GetGamepadButtonPressed()Get the last gamepad button pressed
+count = RL.GetGamepadAxisCount( int gamepad )Return gamepad axis count for a gamepad
+value = RL.GetGamepadAxisMovement( int gamepad, int axis )Return axis movement value for a gamepad axis
+result = RL.SetGamepadMappings( string mappings )Set internal gamepad mappings (SDL_GameControllerDB)
+RL.SetGamepadVibration( int gamepad, float leftMotor, float rightMotor, float duration )Set gamepad vibration for both motors (duration in seconds)
pressed = RL.IsMouseButtonPressed( int button )Detect if a mouse button has been pressed once
+pressed = RL.IsMouseButtonDown( int button )Detect if a mouse button is being pressed
+released = RL.IsMouseButtonReleased( int button )Detect if a mouse button has been released once
+released = RL.IsMouseButtonUp( int button )Check if a mouse button is NOT being pressed
+position = RL.GetMousePosition()Returns mouse position
+position = RL.GetMouseDelta()Get mouse delta between frames
+RL.SetMousePosition( Vector2 position )Set mouse position XY
RL.SetMouseOffset( Vector2 offset )Set mouse offset
RL.SetMouseScale( Vector2 scale )Set mouse scaling
offset = RL.GetMouseOffset()Get mouse offset
+scale = RL.GetMouseScale()Get mouse scale
+movement = RL.GetMouseWheelMove()Get mouse wheel movement for X or Y, whichever is larger
+movement = RL.GetMouseWheelMoveV()Get mouse wheel movement for both X and Y
+RL.SetMouseCursor( int cursor )Set mouse cursor
position = RL.GetTouchPosition( int index )Get touch position XY for a touch point index (relative to screen size)
+id = RL.GetTouchPointId( int index )Get touch point identifier for given index
+count = RL.GetTouchPointCount()Get touch point identifier for given index
+RL.SetGesturesEnabled( unsigned int flags )Enable a set of gestures using flags
detected = RL.IsGestureDetected( int gesture )Check if a gesture have been detected
+gesture = RL.GetGestureDetected()Get latest detected gesture
+time = RL.GetGestureHoldDuration()Get gesture hold time in milliseconds
+vector = RL.GetGestureDragVector()Get gesture drag vector
+angle = RL.GetGestureDragAngle()Get gesture drag angle
+vector = RL.GetGesturePinchVector()Get gesture pinch delta
+angle = RL.GetGesturePinchAngle()Get gesture pinch angle
+camera2D = RL.CreateCamera2D()Return camera2D set to default configuration
+RL.SetCamera2DTarget( camera2D camera, Vector2 target )Set camera target (rotation and zoom origin)
RL.SetCamera2DOffset( camera2D camera, Vector2 offset )Set camera offset (displacement from target)
RL.SetCamera2DRotation( camera2D camera, float rotation )Set camera rotation in degrees
RL.SetCamera2DZoom( camera2D camera, float zoom )Set camera zoom (scaling), should be 1.0f by default
target = RL.GetCamera2DTarget( camera2D camera )Get camera2D target
+offset = RL.GetCamera2DOffset( camera2D camera )Get camera2D offset
+rotation = RL.GetCamera2DRotation( camera2D camera )Get camera2D rotation
+zoom = RL.GetCamera2DZoom( camera2D camera )Get camera2D zoom
+camera = RL.CreateCamera3D()Return camera3D id set to default configuration
+RL.SetCamera3DPosition( camera3D camera, Vector3 position )Set camera position (Remember to call "RL.UpdateCamera3D()" to apply changes)
RL.SetCamera3DTarget( camera3D camera, Vector3 target )Set camera target it looks-at
RL.SetCamera3DUp( camera3D camera, Vector3 up )Set camera up vector (Rotation over it's axis)
RL.SetCamera3DFovy( camera3D camera, float fovy )Set camera field-of-view apperture in Y (degrees) in perspective, used as near plane width in orthographic
RL.SetCamera3DProjection( camera3D camera, int projection )Set camera projection mode (CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC)
position = RL.GetCamera3DPosition( camera3D camera )Get camera position
+target = RL.GetCamera3DTarget( camera3D camera )Get camera target it looks-at
+up = RL.GetCamera3DUp( camera3D camera )Get camera up vector (Rotation over it's axis)
+fovy = RL.GetCamera3DFovy( camera3D camera )Get camera field-of-view apperture in Y (degrees) in perspective, used as near plane width in orthographic
+projection = RL.GetCamera3DProjection( camera3D camera )Get camera projection mode
+forward = RL.GetCamera3DForward( camera3D camera )Returns the cameras forward vector (normalized)
+up = RL.GetCamera3DUpNormalized( camera3D camera )Returns the cameras up vector (normalized) Note: The up vector might not be perpendicular to the forward vector
+right = RL.GetCamera3DRight( camera3D camera )Returns the cameras right vector (normalized)
+RL.Camera3DMoveForward( camera3D camera, float distance, bool moveInWorldPlane )Moves the camera in it's forward direction
RL.Camera3DMoveUp( camera3D camera, float distance )Moves the camera in it's up direction
RL.Camera3DMoveRight( camera3D camera, float distance, bool moveInWorldPlane )Moves the camera target in it's current right direction
RL.Camera3DMoveToTarget( camera3D camera, float delta )Moves the camera position closer/farther to/from the camera target
RL.Camera3DYaw( camera3D camera, float angle, bool rotateAroundTarget )Rotates the camera around it's up vector Yaw is "looking left and right" If rotateAroundTarget is false, the camera rotates around it's position Note: angle must be provided in radians
RL.Camera3DPitch( camera3D camera, float angle, bool lockView, bool rotateAroundTarget, bool rotateUp )Rotates the camera around it's right vector, pitch is "looking up and down"
+NOTE: angle must be provided in radians
RL.Camera3DRoll( camera3D camera, float angle )Rotates the camera around it's forward vector Roll is "turning your head sideways to the left or right" Note: angle must be provided in radians
view = RL.GetCamera3DViewMatrix( camera3D camera )Returns the camera view matrix
+projection = RL.GetCamera3DProjectionMatrix( camera3D camera, float aspect )Returns the camera projection matrix
+RL.UpdateCamera3D( camera3D camera, int mode )Update camera position for selected mode
RL.UpdateCamera3DPro( camera3D camera, Vector3 movement, Vector3 rotation, float zoom )Update camera movement, movement/rotation values should be provided by user
buffer = RL.LoadBuffer( data{} buffer, int type )Load Buffer. Type should be one of the Buffer types. Empty buffer will set data to NULL.
+buffer = RL.LoadBufferFormatted( int length, int type, int value )Load formatted buffer with all values set to 'value'
+buffer = RL.LoadBufferFromFile( string path, int type )Read buffer data from binary file
+buffer = RL.LoadBufferFromString( string buffer )Read buffer data from string
+RL.UnloadBuffer( Buffer buffer )Unload buffer data
RL.CopyBufferData( Buffer dst, Buffer src, int posDst, int posSrc, int size )Copy buffer data to another buffer. Size is in bytes
RL.SetBufferData( Buffer buffer, int position, any{} values )Set buffer data value
RL.SwapBufferEndianness( Buffer buffer )Swap buffer endianness from big endian to little endian and vice versa
data = RL.GetBufferData( Buffer buffer, int position, int length )Get buffer data as table in the format it was stored
+string = RL.GetBufferAsString( Buffer buffer )Get buffer as string
+type = RL.GetBufferType( Buffer buffer )Get buffer type
+size = RL.GetBufferSize( Buffer buffer )Get buffer size in bytes
+size = RL.GetBufferElementSize( Buffer buffer )Get buffer element size in bytes
+length = RL.GetBufferLength( Buffer buffer )Get buffer element count
+RL.ExportBuffer( Buffer buffer, string path )Write buffer data to binary file
RL.SetShapesTexture( Texture texture, Rectangle source )Set texture and rectangle to be used on shapes drawing NOTE: It can be useful when using basic shapes and one single font, defining a font char white rectangle would allow drawing everything in a single draw call
texture = RL.GetShapesTexture()Get texture that is used for shapes drawing. Return as lightuserdata
+source = RL.GetShapesTextureRectangle()Get texture source rectangle that is used for shapes drawing
+RL.DrawPixel( Vector2 pos, Color color )Draw a pixel
RL.DrawLine( Vector2 startPos, Vector2 endPos, float thickness, Color color )Draw a line defining thickness
RL.DrawLineStrip( Vector2{} points, Color color )Draw lines sequence
RL.DrawLineBezier( Vector2 startPos, Vector2 endPos, float thickness, Color color )Draw a line using cubic-bezier curves in-out
RL.DrawCircle( Vector2 center, float radius, Color color )Draw a color-filled circle
RL.DrawCircleSector( Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color )Draw a piece of a circle
RL.DrawCircleSectorLines( Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color )Draw circle sector outline
RL.DrawCircleGradient( Vector2 center, float radius, Color color1, Color color2 )Draw a gradient-filled circle
RL.DrawCircleLines( Vector2 center, float radius, Color color )Draw circle outline
RL.DrawEllipse( Vector2 center, float radiusH, float radiusV, Color color )Draw ellipse
RL.DrawEllipseLines( Vector2 center, float radiusH, float radiusV, Color color )Draw ellipse outline
RL.DrawRing( Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color )Draw ring
RL.DrawRingLines( Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color )Draw ring outline
RL.DrawRectangle( Rectangle rec, Color color )Draw a color-filled rectangle
RL.DrawRectanglePro( Rectangle rec, Vector2 origin, float rotation, Color color )Draw a color-filled rectangle with pro parameters
RL.DrawRectangleGradientV( Rectangle rectangle, Color color1, Color color2 )Draw a vertical-gradient-filled rectangle
RL.DrawRectangleGradientH( Rectangle rectangle, Color color1, Color color2 )Draw a horizontal-gradient-filled rectangle
RL.DrawRectangleGradientEx( Rectangle rectangle, Color col1, Color col2, Color col3, Color col4 )Draw a gradient-filled rectangle with custom vertex colors
RL.DrawRectangleLines( Rectangle rec, Color color )Draw rectangle outline
RL.DrawRectangleLinesEx( Rectangle rec, int lineThick, Color color )Draw rectangle outline with extended parameters
RL.DrawRectangleRounded( Rectangle rec, float roundness, int segments, Color color )Draw rectangle with rounded edges
RL.DrawRectangleRoundedLines( Rectangle rec, float roundness, int segments, Color color )Draw rectangle lines with rounded edges
RL.DrawRectangleRoundedLinesEx( Rectangle rec, float roundness, int segments, float lineThick, Color color )Draw rectangle with rounded edges outline
RL.DrawTriangle( Vector2 v1, Vector2 v2, Vector2 v3, Color color )Draw a color-filled triangle (Vertex in counter-clockwise order!)
RL.DrawTriangleLines( Vector2 v1, Vector2 v2, Vector2 v3, Color color )Draw triangle outline (Vertex in counter-clockwise order!)
RL.DrawTriangleFan( Vector2{} points, Color color )Draw a triangle fan defined by points (first vertex is the center)
RL.DrawTriangleStrip( Vector2{} points, Color color )Draw a triangle strip defined by points
RL.DrawPoly( Vector2 center, int sides, float radius, float rotation, Color color )Draw a regular polygon (Vector version)
RL.DrawPolyLines( Vector2 center, int sides, float radius, float rotation, Color color )Draw a polygon outline of n sides
RL.DrawPolyLinesEx( Vector2 center, int sides, float radius, float rotation, float lineThick, Color color )Draw a polygon outline of n sides with extended parameters
RL.DrawSplineLinear( Vector2{} points, float thick, Color color )Draw spline: Linear, minimum 2 points
RL.DrawSplineBasis( Vector2{} points, float thick, Color color )Draw spline: B-Spline, minimum 4 points
RL.DrawSplineCatmullRom( Vector2{} points, float thick, Color color )Draw spline: Catmull-Rom, minimum 4 points
RL.DrawSplineBezierQuadratic( Vector2{} points, float thick, Color color )Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]
RL.DrawSplineBezierCubic( Vector2{} points, float thick, Color color )Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]
RL.DrawSplineSegmentLinear( Vector2 p1, Vector2 p2, float thick, Color color )Draw spline segment: Linear, 2 points
RL.DrawSplineSegmentBasis( Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color )Draw spline segment: B-Spline, 4 points
RL.DrawSplineSegmentCatmullRom( Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color )Draw spline segment: Catmull-Rom, 4 points
RL.DrawSplineSegmentBezierQuadratic( Vector2 p1, Vector2 c2, Vector2 p3, float thick, Color color )Draw spline segment: Quadratic Bezier, 2 points, 1 control point
RL.DrawSplineSegmentBezierCubic( Vector2 p1, Vector2 c2, Vector2 c3, Vector2 p4, float thick, Color color )Draw spline segment: Cubic Bezier, 2 points, 2 control points
point = RL.GetSplinePointLinear( Vector2 startPos, Vector2 endPos, float t )Get (evaluate) spline point: Linear
+point = RL.GetSplinePointBasis( Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float t )Get (evaluate) spline point: B-Spline
+point = RL.GetSplinePointCatmullRom( Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float t )Get (evaluate) spline point: Catmull-Rom
+point = RL.GetSplinePointBezierQuad( Vector2 p1, Vector2 c2, Vector2 p3, float t )Get (evaluate) spline point: Quadratic Bezier
+point = RL.GetSplinePointBezierCubic( Vector2 p1, Vector2 c2, Vector2 c3, Vector2 p4, float t )Get (evaluate) spline point: Cubic Bezier
+collision = RL.CheckCollisionRecs( Rectangle rec1, Rectangle rec2 )Check collision between two rectangles
+collision = RL.CheckCollisionCircles( Vector2 center1, float radius1, Vector2 center2, float radius2 )Check collision between two circles
+collision = RL.CheckCollisionCircleRec( Vector2 center, float radius, Rectangle rec )Check collision between circle and rectangle
+collision = RL.CheckCollisionCircleLine( Vector2 center, float radius, Vector2 p1, Vector2 p2 )Check if circle collides with a line created betweeen two points [p1] and [p2]
+collision = RL.CheckCollisionPointRec( Vector2 point, Rectangle rec )Check if point is inside rectangle
+collision = RL.CheckCollisionPointCircle( Vector2 point, Vector2 center, float radius )Check if point is inside circle
+collision = RL.CheckCollisionPointTriangle( Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3 )Check if point is inside a triangle
+collision = RL.CheckCollisionPointPoly( Vector2 point, Vector2{} points )Check if point is within a polygon described by array of vertices
+collision, position = RL.CheckCollisionLines( Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2 )Check the collision between two lines defined by two points each, returns collision point by reference
+collision = RL.CheckCollisionPointLine( Vector2 point, Vector2 p1, Vector2 p2, int threshold )Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
+rectangle = RL.GetCollisionRec( Rectangle rec1, Rectangle rec2 )Get collision rectangle for two rectangles collision
+rects{} = RL.RectPack( Rectangle{} rects, Vector2 size, int padding )Useful for e.g. packing rectangular textures into an atlas. stbrp_pack_rects
+image = RL.LoadImage( string fileName )Load image from file into CPU memory (RAM)
+image = RL.LoadImageRaw( string fileName, Vector2 size, int format, int headerSize )Load image from RAW file data
+image, frameCount = RL.LoadImageAnim( string fileName )Load image sequence from file (frames appended to image.data). All frames are returned in RGBA format
+image, frameCount = RL.LoadImageAnimFromMemory( string fileType, Buffer fileData )Load image sequence from memory buffer. All frames are returned in RGBA format
+image, frameCount = RL.LoadImageFromMemory( string fileType, Buffer data )Load image from memory buffer, fileType refers to extension: i.e. '.png'
+image, frameCount = RL.LoadImageFromData( Buffer data, Vector2 size, int mipmaps, int format )Load image from data
+image = RL.LoadImageFromTexture( Texture texture )Load image from GPU texture data
+image = RL.LoadImageFromScreen()Load image from screen buffer and (screenshot)
+isValid = RL.IsImageValid( Image image )Check if an image is valid (data and parameters)
+RL.UnloadImage( Image image )Unload image from CPU memory (RAM)
success = RL.ExportImage( Image image, string fileName )Export image data to file, returns true on success
+buffer = RL.ExportImageToMemory( Image image, string fileType )Export image to memory buffer
+success = RL.ExportImageAsCode( Image image, string fileName )Export image as code file defining an array of bytes, returns true on success
+image = RL.GenImageColor( Vector2 size, Color color )Generate image: plain color
+image = RL.GenImageGradientLinear( Vector2 size, int direction, Color a, Color b )Generate image: linear gradient, direction in degrees [0..360], 0=Vertical gradient
+image = RL.GenImageGradientRadial( Vector2 size, float density, Color inner, Color outer )Generate image: radial gradient
+image = RL.GenImageGradientSquare( Vector2 size, float density, Color inner, Color outer )Generate image: square gradient
+image = RL.GenImageChecked( Vector2 size, Vector2 checks, Color col1, Color col2 )Generate image: checked
+image = RL.GenImageWhiteNoise( Vector2 size, float factor )Generate image: white noise
+image = RL.GenImagePerlinNoise( Vector2 size, Vector2 offset, float factor )Generate image: perlin noise
+image = RL.GenImageCellular( Vector2 size, int tileSize )Generate image: cellular algorithm. Bigger tileSize means bigger cells
+image = RL.GenImageText( Vector2 size, string text )Generate image: grayscale image from text data
+image = RL.ImageCopy( Image image )Create an image duplicate (useful for transformations)
+image = RL.ImageFromImage( Image image, Rectangle rec )Create an image from another image piece
+image = RL.ImageFromChannel( Image image, int selectedChannel )Create an image from a selected channel of another image (GRAYSCALE)
+image = RL.ImageText( string text, int fontSize, Color tint )Create an image from text (default font)
+image = RL.ImageTextEx( Font font, string text, float fontSize, float spacing, Color tint )Create an image from text (custom sprite font)
+RL.ImageFormat( Image image, int newFormat )Convert image data to desired format
RL.ImageToPOT( Image image, Color fill )Convert image to POT (power-of-two)
RL.ImageCrop( Image image, Rectangle crop )Crop an image to a defined rectangle
RL.ImageAlphaCrop( Image image, float threshold )Crop image depending on alpha value
RL.ImageAlphaClear( Image image, Color color, float threshold )Clear alpha channel to desired color
RL.ImageAlphaMask( Image image, Image alphaMask )Apply alpha mask to image
RL.ImageAlphaPremultiply( Image image )Premultiply alpha channel
RL.ImageBlurGaussian( Image image, int blurSize )Apply Gaussian blur using a box blur approximation
RL.ImageKernelConvolution( Image image, float{} kernel )Apply custom square convolution kernel to image
RL.ImageResize( Image image, Vector2 size )Resize image (Bicubic scaling algorithm)
RL.ImageResizeNN( Image image, Vector2 size )Resize image (Nearest-Neighbor scaling algorithm)
RL.ImageResizeCanvas( Image image, Vector2 size, Vector2 offset, Color fill )Resize canvas and fill with color
RL.ImageMipmaps( Image image )Generate all mipmap levels for a provided image
RL.ImageDither( Image image, Color bpp )Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
RL.ImageFlipVertical( Image image )Flip image vertically
RL.ImageFlipHorizontal( Image image )Flip image horizontally
RL.ImageRotate( Image image, int degrees )Rotate image by input angle in degrees (-359 to 359)
RL.ImageRotateCW( Image image )Rotate image clockwise 90deg
RL.ImageRotateCCW( Image image )Rotate image counter-clockwise 90deg
RL.ImageColorTint( Image image, Color color )Modify image color: tint
RL.ImageColorInvert( Image image )Modify image color: invert
RL.ImageColorGrayscale( Image image )Modify image color: grayscale
RL.ImageColorContrast( Image image, float contrast )Modify image color: contrast (-100 to 100)
RL.ImageColorBrightness( Image image, int brightness )Modify image color: brightness (-255 to 255)
RL.ImageColorReplace( Image image, Color color, Color replace )Modify image color: replace color
colors = RL.LoadImageColors( Image image )Load color data from image as a Color array (RGBA - 32bit)
+colors = RL.LoadImagePalette( Image image, int maxPaletteSize )Load colors palette from image as a Color array (RGBA - 32bit)
+rectangle = RL.GetImageAlphaBorder( Image image, float threshold )Get image alpha border rectangle
+color = RL.GetImageColor( Image image, Vector2 pixelPos )Get image pixel color at (x, y) position
+RL.SetImageData( Image image, Buffer data )Set image data from Buffer
imageData = RL.GetImageData( Image image )Get image data as Buffer
+size = RL.GetImageSize( Image image )Get image size
+mipmaps = RL.GetImageMipmaps( Image image )Get image mipmaps. Mipmap levels, 1 by default
+format = RL.GetImageFormat( Image image )Get image data format (PixelFormat type)
+RL.ImageClearBackground( Image dst, Color color )Clear image background with given color
RL.ImageDrawPixel( Image dst, Vector2 position, Color color )Draw pixel within an image
RL.ImageDrawLine( Image dst, Vector2 start, Vector2 end, Color color )Draw line within an image
RL.ImageDrawLineEx( Image dst, Vector2 start, Vector2 end, int thick, Color color )Draw a line defining thickness within an image
RL.ImageDrawCircle( Image dst, Vector2 center, int radius, Color color )Draw circle within an image
RL.ImageDrawCircleLines( Image dst, Vector2 center, int radius, Color color )Draw circle outline within an image
RL.ImageDrawRectangle( Image dst, Rectangle rec, Color color )Draw rectangle within an image
RL.ImageDrawRectangleLines( Image dst, Rectangle rec, int thick, Color color )Draw rectangle lines within an image
RL.ImageDrawTriangle( Image dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color )Draw triangle within an image
RL.ImageDrawTriangleEx( Image dst, Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3 )Draw triangle with interpolated colors within an image
RL.ImageDrawTriangleLines( Image dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color )Draw triangle outline within an image
RL.ImageDrawTriangleFan( Image dst, Vector2{} points, Color color )Draw a triangle fan defined by points within an image (first vertex is the center)
RL.ImageDrawTriangleStrip( Image dst, Vector2{} points, Color color )Draw a triangle strip defined by points within an image
RL.ImageDraw( Image dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint )Draw a source image within a destination image (Tint applied to source)
RL.ImageDrawText( Image dst, string text, Vector2 position, float fontSize, Color tint )Draw text (using default font) within an image (destination)
RL.ImageDrawTextEx( Image dst, Font font, string text, Vector2 position, float fontSize, float spacing, Color tint )Draw text (Custom sprite font) within an image (Destination)
texture = RL.GetTextureDefault()Get default texture. Return as lightuserdata
+texture = RL.LoadTexture( string fileName )Load texture from file into GPU memory ( VRAM )
+texture = RL.LoadTextureFromImage( Image image )Load texture from image data
+texture = RL.LoadTextureCubemap( Image image, int layout )Load cubemap from image, multiple image cubemap layouts supported
+texture = RL.LoadTextureFromData( Texture{} textureData )Load Texture from data
+renderTexture = RL.LoadRenderTexture( Vector2 size )Load texture for rendering (framebuffer)
+renderTexture = RL.LoadRenderTextureFromData( Texture{} renderTextureData )Load RenderTexture from data (framebuffer)
+isValid = RL.IsTextureValid( Texture texture )Check if a texture is valid (loaded in GPU)
+RL.UnloadTexture( Texture texture )Unload texture from GPU memory (VRAM)
isValid = RL.IsRenderTextureValid( RenderTexture target )Check if a render texture is valid (loaded in GPU)
+RL.UnloadRenderTexture( RenderTexture target )Unload render texture from GPU memory (VRAM)
RL.UpdateTexture( Texture texture, Buffer pixels )Update GPU texture with new data
RL.UpdateTextureRec( Texture texture, Rectangle rec, Buffer pixels )Update GPU texture rectangle with new data.
RL.GenTextureMipmaps( Texture texture )Generate GPU mipmaps for a texture
RL.SetTextureFilter( Texture texture, int filter )Set texture scaling filter mode (TEXTURE_FILTER_POINT, TEXTURE_FILTER_BILINEAR...)
RL.SetTextureWrap( Texture texture, int wrap )Set texture wrapping mode (TEXTURE_WRAP_REPEAT, TEXTURE_WRAP_CLAMP...)
id = RL.GetTextureId( Texture texture )Get OpenGL texture id
+size = RL.GetTextureSize( Texture texture )Get texture size
+mipmaps = RL.GetTextureMipmaps( Texture texture )Get texture mipmaps. Mipmap levels, 1 by default
+format = RL.GetTextureFormat( Texture texture )Get texture data format (PixelFormat type)
+RL.DrawTexture( Texture texture, Vector2 position, Color tint )Draw a Texture2D
RL.DrawTextureEx( Texture texture, Vector2 position, float rotation, float scale, Color tint )Draw a Texture2D with extended parameters
RL.DrawTextureRec( Texture texture, Rectangle source, Vector2 position, Color tint )Draw a part of a texture defined by a rectangle
RL.DrawTexturePro( Texture texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint )Draw a part of a texture defined by a rectangle with "pro" parameters
RL.DrawTextureNPatch( Texture texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint )Draws a texture (or part of it) that stretches or shrinks nicely
RL.DrawTextureNPatchRepeat( Texture texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint )Draws a texture (or part of it) that repeats nicely
id = RL.GetRenderTextureId( RenderTexture renderTexture )Get OpenGL framebuffer object id
+texture = RL.GetRenderTextureTexture( RenderTexture renderTexture )Get color buffer attachment texture. Returns as lightuserdata
+texture = RL.GetRenderTextureDepthTexture( RenderTexture renderTexture )Get depth buffer attachment texture. Returns as lightuserdata
+isEqual = RL.ColorIsEqual( Color col1, Color col2 )Check if two colors are equal
+color = RL.Fade( Color color, float alpha )Returns color with alpha applied, alpha goes from 0.0f to 1.0f
+value = RL.ColorToInt( Color color )Returns hexadecimal value for a Color
+color = RL.ColorNormalize( Color color )Returns Color normalized as float [0..1]
+color = RL.ColorFromNormalized( Vector4 normalized )Color from normalized values [0..1]
+HSV = RL.ColorToHSV( Color color )Returns HSV values for a Color, hue [0..360], saturation/value [0..1]
+color = RL.ColorFromHSV( float hue, float saturation, float value )Returns a Color from HSV values, hue [0..360], saturation/value [0..1]
+color = RL.ColorTint( Color color, Color tint )Get color multiplied with another color
+color = RL.ColorBrightness( Color color, float factor )Get color with brightness correction, brightness factor goes from -1.0f to 1.0f
+color = RL.ColorContrast( Color color, float contrast )Get color with contrast correction, contrast values between -1.0f and 1.0f
+color = RL.ColorAlpha( Color color, float alpha )Returns color with alpha applied, alpha goes from 0.0f to 1.0f
+color = RL.ColorAlphaBlend( Color dst, Color src, Color tint )Returns src alpha-blended into dst color with tint
+color = RL.ColorLerp( Color color1, Color color2, float factor )Get color lerp interpolation between two colors, factor [0.0f..1.0f]
+color = RL.GetColor( int hexValue )Get Color structure from hexadecimal value
+size = RL.GetPixelDataSize( Vector2 size, int format )Get pixel data size in bytes for certain format
+font = RL.GetFontDefault()Get the default Font. Return as lightuserdata
+font = RL.LoadFont( string fileName )Load font from file into GPU memory (VRAM)
+font = RL.LoadFontEx( string fileName, int fontSize, int{}|nil codepoints )Load font from file with extended parameters, use NULL for codepoints to load the default character set
+font = RL.LoadFontFromImage( Image image, Color key, int firstChar )Load font from Image (XNA style)
+font = RL.LoadFontFromMemory( string fileType, Buffer fileData, int fontSize, int{} codepoints )Load font from memory buffer, fileType refers to extension: i.e. '.ttf'. NOTE: fileData type should be unsigned char
+font = RL.LoadFontFromData( Font{} fontData )Load Font from data
+font = RL.FontCopy( Font font )Load font copy as new userdata
+isValid = RL.IsFontValid( Font font )Check if a font is valid (font data loaded, WARNING: GPU texture not checked)
+glyphs = RL.LoadFontData( Buffer fileData, int fontSize, int{} codepoints, int type )Load font data for further use. NOTE: fileData type should be unsigned char
+image, rectangles = RL.GenImageFontAtlas( GlyphInfo{} glyphs, int fontSize, int padding, int packMethod )Generate image font atlas using chars info. NOTE: Packing method: 0-Default, 1-Skyline
+RL.UnloadFont( Font font )Unload font from GPU memory (VRAM)
RL.ExportFontAsCode( Font font, string fileName )Export font as code file, returns true on success
+RL.DrawFPS( Vector2 pos )Draw current FPS
RL.DrawText( string text, Vector2 position, float fontSize, Color tint )Draw text (using default font)
RL.DrawTextEx( Font font, string text, Vector2 position, float fontSize, float spacing, Color tint )Draw text using font and additional parameters
RL.DrawTextPro( Font font, string text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint )Draw text using Font and pro parameters (rotation)
RL.DrawTextCodepoint( Font font, int codepoint, Vector2 position, float fontSize, Color tint )Draw one character (codepoint)
RL.DrawTextCodepoints( Font font, int{} codepoints, Vector2 position, float fontSize, float spacing, Color tint )Draw multiple character (codepoint)
mouseCharId, textOffset = RL.DrawTextBoxed( Font font, string text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, bool limitHeight, Vector2|nil textOffset, int|nil tabSize )Draw text inside rectangle limits. Return character id from mouse position (default 0). textOffset can be used to set start position inside rectangle. Usefull to pass from previous DrawTextBoxed for continuous text. Support for tint change with "\a#FFFFFFFF"
+RL.SetTextLineSpacing( int spacing )Set vertical line spacing when drawing with line-breaks
spacing = RL.GetTextLineSpacing()Get vertical line spacing when drawing with line-breaks
+width = RL.MeasureText( string text, int fontSize )Measure string width for default font
+size = RL.MeasureTextEx( Font font, string text, float fontSize, float spacing )Measure string size for Font
+size, textOffset = RL.MeasureTextBoxed( Font font, string text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, bool limitHeight, Vector2 textOffset, int|nil tabSize )Measure text inside rectangle limits.
+index = RL.GetGlyphIndex( Font font, int codepoint )Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found
+glyphInfo = RL.GetGlyphInfo( Font font, int codepoint )Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found. Return as lightuserdata
+glyphInfo = RL.GetGlyphInfoByIndex( Font font, int index )Get glyph font info data by index. Return as lightuserdata
+rect = RL.GetGlyphAtlasRec( Font font, int codepoint )Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found
+rect = RL.GetGlyphAtlasRecByIndex( Font font, int index )Get glyph rectangle in font atlas by index
+baseSize = RL.GetFontBaseSize( Font font )Get font base size (default chars height)
+glyphCount = RL.GetFontGlyphCount( Font font )Get font number of glyph characters
+glyphPadding = RL.GetFontGlyphPadding( Font font )Get font padding around the glyph characters
+texture = RL.GetFontTexture( Font font )Get font texture atlas containing the glyphs. Return as lightuserdata
+glyphInfo = RL.LoadGlyphInfo( GlyphInfo{} glyphInfoData )Load GlyphInfo from data
+RL.UnloadGlyphInfo( GlyphInfo glyphInfo )Unload glyphInfo image from CPU memory (RAM)
RL.SetGlyphInfoValue( GlyphInfo glyphInfo, int value )Set glyphInfo character value (Unicode)
RL.SetGlyphInfoOffset( GlyphInfo glyphInfo, Vector2 offset )Set glyphInfo character offset when drawing
RL.SetGlyphInfoAdvanceX( GlyphInfo glyphInfo, int advanceX )Set glyphInfo character advance position X
RL.SetGlyphInfoImage( GlyphInfo glyphInfo, Image image )Set glyphInfo character image data
value = RL.GetGlyphInfoValue( GlyphInfo glyphInfo )Get glyphInfo character value (Unicode)
+offset = RL.GetGlyphInfoOffset( GlyphInfo glyphInfo )Get glyphInfo character offset when drawing
+advanceX = RL.GetGlyphInfoAdvanceX( GlyphInfo glyphInfo )Get glyphInfo character advance position X
+image = RL.GetGlyphInfoImage( GlyphInfo glyphInfo )Get glyphInfo character image data. Return as lightuserdata
+string = RL.LoadUTF8( int{} codepoints )Load UTF-8 text encoded from codepoints array
+codepoints = RL.LoadCodepoints( string text )Load all codepoints from a UTF-8 text string
+count = RL.GetCodepointCount( string text )Get total number of codepoints in a UTF-8 encoded string
+codepoint, codepointSize = RL.GetCodepoint( string text, int position )Get codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
+codepoint, codepointSize = RL.GetCodepointNext( string text, int position )Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
+codepoint, codepointSize = RL.GetCodepointPrevious( string text, int position )Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
+string = RL.CodepointToUTF8( int codepoint )Encode one codepoint into UTF-8 byte array
+text = RL.TextSubtext( string text, int position, int length )Get a piece of a text string
+text = RL.TextReplace( string text, string replace, string by )Replace text string
+text = RL.TextInsert( string text, string insert, int position )Insert text in a specific position, moves all text forward
+splits = RL.TextSplit( string text, char delimiter )Split text into multiple strings
+index = RL.TextFindIndex( string text, string find )Find first text occurrence within a string
+text = RL.TextToPascal( string text )Get Pascal case notation version of provided string
+text = RL.TextToSnake( string text )Get Snake case notation version of provided string
+text = RL.TextToCamel( string text )Get Camel case notation version of provided string
+RL.DrawLine3D( Vector3 startPos, Vector3 endPos, Color color )Draw a line in 3D world space
RL.DrawPoint3D( Vector3 position, Color color )Draw a point in 3D space, actually a small line
RL.DrawCircle3D( Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color )Draw a circle in 3D world space
RL.DrawTriangle3D( Vector3 v1, Vector3 v2, Vector3 v3, Color color )Draw a color-filled triangle (Vertex in counter-clockwise order!)
RL.DrawTriangleStrip3D( Vector3{} points, Color color )Draw a triangle strip defined by points
RL.DrawCube( Vector3 position, Vector3 size, Color color )Draw cube
RL.DrawCubeWires( Vector3 position, Vector3 size, Color color )Draw cube wires
RL.DrawSphere( Vector3 centerPos, float radius, Color color )Draw sphere
RL.DrawSphereEx( Vector3 centerPos, float radius, int rings, int slices, Color color )Draw sphere with extended parameters
RL.DrawSphereWires( Vector3 centerPos, float radius, int rings, int slices, Color color )Draw sphere wires
RL.DrawCylinder( Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color )Draw a cylinder/cone
RL.DrawCylinderEx( Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color )Draw a cylinder with base at startPos and top at endPos
RL.DrawCylinderWires( Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color )Draw a cylinder/cone wires
RL.DrawCylinderWiresEx( Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color )Draw a cylinder wires with base at startPos and top at endPos
RL.DrawCapsule( Vector3 startPos, Vector3 endPos, float radius, int slices, int rings, Color color )Draw a capsule with the center of its sphere caps at startPos and endPos
RL.DrawCapsuleWires( Vector3 startPos, Vector3 endPos, float radius, int slices, int rings, Color color )Draw capsule wireframe with the center of its sphere caps at startPos and endPos
RL.DrawPlane( Vector3 centerPos, Vector2 size, Color color )Draw a plane XZ
RL.DrawQuad3DTexture( Texture texture, Vector3{} vertices, Vector2{} texCoords, Color{} colors )Draw 3D textured quad. (Texture coordinates opengl style 0.0 - 1.0)
RL.DrawRay( Ray ray, Color color )Draw a ray line
RL.DrawGrid( int slices, float spacing )Draw a grid (Centered at ( 0, 0, 0 ))
RL.DrawGridEx( Vector2 slices, Vector2 spacing, Matrix transform, Color color, Vector2|nil divider, Color|nil dividerColor )Draw a grid with extended parameters. Optionally you can define divider with different color for every n slices
model = RL.LoadModel( string fileName )Load model from files (Meshes and materials)
+model = RL.LoadModelFromMesh( Mesh mesh )Load model from generated mesh (Default material)
+isValid = RL.IsModelValid( Model model )Check if a model is valid (loaded in GPU, VAO/VBOs)
+RL.UnloadModel( Model model )Unload model (meshes/materials) from memory (RAM and/or VRAM)
boundingBox = RL.GetModelBoundingBox( Model model )Compute model bounding box limits (considers all meshes)
+RL.SetModelTransform( Model model, Matrix transform )Set model transform matrix
success = RL.SetModelMesh( Model model, int meshId, Mesh mesh )Set model mesh.
+success = RL.SetModelMaterial( Model model, int materialId, Material material )Set material to model material
+RL.SetModelMeshMaterial( Model model, int meshId, int materialId )Set material for a mesh (Mesh and material on this model)
success = RL.SetModelBone( Model model, int boneId, BoneInfo bone )Set model bone information (skeleton)
+success = RL.SetModelBindPose( Model model, int boneId, Transform pose )Set model bones base transformation (pose)
+transform = RL.GetModelTransform( Model model )Get model transform matrix
+meshCount = RL.GetModelMeshCount( Model model )Get model number of meshes
+meshCount = RL.GetModelMaterialCount( Model model )Get model number of materials
+mesh = RL.GetModelMesh( Model model, int meshId )Get model mesh. Return as lightuserdata
+material = RL.GetModelMaterial( Model model, int materialId )Get model material. Return as lightuserdata
+boneCount = RL.GetModelBoneCount( Model model )Get model number of bones
+bone = RL.GetModelBone( Model model, int boneId )Get model bones information (skeleton)
+pose = RL.GetModelBindPose( Model model, int boneId )Get models bones base transformation (pose)
+RL.DrawModel( Model model, Vector3 position, float scale, Color tint )Draw a model (With texture if set)
RL.DrawModelEx( Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint )Draw a model with extended parameters
RL.DrawModelWires( Model model, Vector3 position, float scale, Color tint )Draw a model wires (with texture if set)
RL.DrawModelWiresEx( Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint )Draw a model wires (with texture if set) with extended parameters
RL.DrawModelPoints( Model model, Vector3 position, float scale, Color tint )Draw a model as points
RL.DrawModelPointsEx( Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint )Draw a model as points with extended parameters
RL.DrawBoundingBox( BoundingBox box, Color color )Draw bounding box (wires)
RL.DrawBillboard( Camera3D camera, Texture texture, Vector3 position, float size, Color tint )Draw a billboard texture
RL.DrawBillboardRec( Camera3D camera, Texture texture, Rectangle source, Vector3 position, Vector2 size, Color tint )Draw a billboard texture defined by source
RL.DrawBillboardPro( Camera3D camera, Texture texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint )Draw a billboard texture defined by source and rotation
RL.UpdateMesh( Mesh mesh, Mesh{} meshData )Update mesh vertex data in GPU. NOTE: Mainly intented to be used with custom meshes.
RL.UnloadMesh( Mesh mesh )Unload mesh data from CPU and GPU
RL.DrawMesh( Mesh mesh, Material material, Matrix transform )Draw a 3d mesh with material and transform
RL.DrawMeshInstanced( Mesh mesh, Material material, Buffer transforms, int instances )Draw multiple mesh instances with material and different transforms
success = RL.SetMeshColor( Mesh mesh, Color color )Updades mesh color vertex attribute buffer NOTE: Currently only works on custom mesh
+success = RL.ExportMesh( Mesh mesh, string fileName )Export mesh data to file, returns true on success
+success = RL.ExportMeshAsCode( Mesh mesh, string fileName )Export mesh as code file (.h) defining multiple arrays of vertex attributes
+boundingBox = RL.GetMeshBoundingBox( Mesh mesh )Compute mesh bounding box limits
+RL.GenMeshTangents( Mesh mesh )Compute mesh tangents
meshData = RL.GetMeshData( Mesh mesh )Get mesh vertex attributes data as table.
+mesh = RL.GenMeshPoly( int sides, float radius )Generate polygonal mesh
+mesh = RL.GenMeshPlane( float width, float length, int resX, int resZ )Generate plane mesh (With subdivisions)
+mesh = RL.GenMeshCube( Vector3 size )Generate cuboid mesh
+mesh = RL.GenMeshSphere( float radius, int rings, int slices )Generate sphere mesh (Standard sphere)
+mesh = RL.GenMeshHemiSphere( float radius, int rings, int slices )Generate half-sphere mesh (no bottom cap)
+mesh = RL.GenMeshCylinder( float radius, float height, int slices )Generate cylinder mesh
+mesh = RL.GenMeshCone( float radius, float height, int slices )Generate cone/pyramid mesh
+mesh = RL.GenMeshTorus( float radius, float size, int radSeg, int sides )Generate torus mesh
+mesh = RL.GenMeshKnot( float radius, float size, int radSeg, int sides )Generate torus mesh
+mesh = RL.GenMeshHeightmap( Image heightmap, Vector3 size )Generate heightmap mesh from image data
+mesh = RL.GenMeshCubicmap( Image cubicmap, Vector3 cubeSize )Generate cubes-based map mesh from image data
+mesh = RL.GenMeshCustom( Mesh{} meshData, bool dynamic )Generate custom mesh from vertex attribute data and uploads it into a VAO (if supported) and VBO
+materials = RL.LoadMaterials( string fileName )Load materials from model file
+material = RL.GetMaterialDefault()Default material for reference. Return as lightuserdata
+material = RL.LoadMaterialDefault()Load default material as new object
+material = RL.CreateMaterial( Material{} materialData )Load material from table. See material table definition
+isValid = RL.IsMaterialValid( Material material )Check if a material is valid (shader assigned, map textures loaded in GPU)
+RL.UnloadMaterial( Material material, bool freeAll )Unload material from GPU memory (VRAM). Note! Use freeAll to unload shaders and textures
RL.SetMaterialTexture( Material material, int mapType, Texture texture )Set texture for a material map type (MATERIAL_MAP_ALBEDO, MATERIAL_MAP_METALNESS...)
RL.SetMaterialColor( Material material, int mapType, Color color )Set color for a material map type
RL.SetMaterialValue( Material material, int mapType, float value )Set value for a material map type
RL.SetMaterialShader( Material material, Shader shader )Set shader for material
RL.SetMaterialParams( Material material, float{} params )Set material generic parameters (if required)
texture = RL.GetMaterialTexture( Material material, int mapType )Get texture from material map type. Return as lightuserdata
+color = RL.GetMaterialColor( Material material, int mapType )Get color from material map type
+value = RL.GetMaterialValue( Material material, int mapType )Get color from material map type
+shader = RL.GetMaterialShader( Material material )Get material shader. Return as lightuserdata
+params = RL.GetMaterialParams( Material material )Get material parameters
+animations = RL.LoadModelAnimations( string fileName )Load model animations from file
+RL.UpdateModelAnimation( Model model, ModelAnimation animation, int frame )Update model animation pose
RL.UpdateModelAnimationBones( Model model, ModelAnimation animation, int frame )Update model animation mesh bone matrices (GPU skinning)
RL.UnloadModelAnimation( ModelAnimation animation )Unload animation data
RL.UnloadModelAnimations( ModelAnimation{} animations )Unload animation table data
valid = RL.IsModelAnimationValid( Model model, ModelAnimation animation )Check model animation skeleton match
+success = RL.SetModelAnimationBone( ModelAnimation animation, int boneId, BoneInfo bone )Set modelAnimation bones information (skeleton)
+success = RL.SetModelAnimationFramePose( ModelAnimation animation, int frame, int boneId, Transform pose )Set modelAnimation bones base transformation (pose)
+RL.SetModelAnimationName( ModelAnimation animation, string name )Set modelAnimation name
boneCount = RL.GetModelAnimationBoneCount( ModelAnimation animation )Return modelAnimation bone count
+frameCount = RL.GetModelAnimationFrameCount( ModelAnimation animation )Return modelAnimation frame count
+bone = RL.GetModelAnimationBone( ModelAnimation animation, int boneId )Get modelAnimation bones information (skeleton)
+pose = RL.GetModelAnimationFramePose( ModelAnimation animation, int frame, int boneId )Get modelAnimation bones base transformation (pose)
+name = RL.GetModelAnimationName( ModelAnimation animation )Get modelAnimation name
+collision = RL.CheckCollisionSpheres( Vector3 center1, float radius1, Vector3 center2, float radius2 )Check collision between two spheres
+collision = RL.CheckCollisionBoxes( BoundingBox box1, BoundingBox box2 )Check collision between two bounding boxes
+collision = RL.CheckCollisionBoxSphere( BoundingBox box, Vector3 center, float radius )Check collision between box and sphere
+rayCollision = RL.GetRayCollisionSphere( Ray ray, Vector3 center, float radius )Get collision info between ray and sphere. ( RayCollision is Lua table of { hit, distance, point, normal } )
+rayCollision = RL.GetRayCollisionBox( Ray ray, BoundingBox box )Get collision info between ray and box
+rayCollision = RL.GetRayCollisionMesh( Ray ray, Mesh mesh, Matrix transform )Get collision info between ray and mesh
+rayCollision = RL.GetRayCollisionTriangle( Ray ray, Vector3 p1, Vector3 p2, Vector3 p3 )Get collision info between ray and triangle
+rayCollision = RL.GetRayCollisionQuad( Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4 )Get collision info between ray and quad. NOTE: The points are expected to be in counter-clockwise winding
+cells, exitPoint = RL.GetRayBoxCells( Ray ray, BoundingBox box, Vector3 cellSize )Get cell positions inside box that intersect with the ray. Also returns ray exit point. Returns empty table if ray misses the box
+RL.InitAudioDevice()Initialize audio device and context
RL.CloseAudioDevice()Close the audio device and context
isReady = RL.IsAudioDeviceReady()Check if audio device has been initialized successfully
+RL.SetMasterVolume( float volume )Set master volume (listener)
volume = RL.GetMasterVolume()Get master volume (listener)
+sound = RL.LoadSound( string fileName )Load sound from file
+wave = RL.LoadWave( string fileName )Load wave data from file
+wave = RL.LoadWaveFromMemory( string fileType, Buffer data )Load wave from memory buffer, fileType refers to extension: i.e. '.wav'
+isValid = RL.IsWaveValid( Wave wave )Checks if wave data is valid (data loaded and parameters)
+sound = RL.LoadSoundFromWave( Wave wave )Load sound from wave data
+sound = RL.LoadSoundAlias( Sound source )Create a new sound that shares the same sample data as the source sound, does not own the sound data
+isValid = RL.IsSoundValid( Sound sound )Checks if a sound is valid (data loaded and buffers initialized)
+RL.UpdateSound( Sound sound, Buffer data, int sampleCount )Update sound buffer with new data
RL.UnloadWave( Wave wave )Unload wave data
RL.UnloadSound( Sound sound )Unload sound
RL.UnloadSoundAlias( Sound alias )Unload a sound alias (does not deallocate sample data)
success = RL.ExportWave( Wave wave, string fileName )Export wave data to file, returns true on success
+success = RL.ExportWaveAsCode( Wave wave, string fileName )Export wave sample data to code (.h), returns true on success
+RL.PlaySound( Sound sound )Play a sound
RL.StopSound( Sound sound )Stop playing a sound
RL.PauseSound( Sound sound )Pause a sound
RL.ResumeSound( Sound sound )Resume a paused sound
playing = RL.IsSoundPlaying( Sound sound )Check if a sound is currently playing
+RL.SetSoundVolume( Sound sound, float volume )Set volume for a sound (1.0 is max level)
RL.SetSoundPitch( Sound sound, float pitch )Set pitch for a sound (1.0 is base level)
RL.SetSoundPan( Sound sound, float pan )Set pan for a sound (0.5 is center)
stream = RL.GetSoundStream( Sound sound )Get sound audio stream. Return as lightuserdata
+RL.WaveFormat( Wave wave, int sampleRate, int sampleSize, int channels )Convert wave data to desired format
samples = RL.LoadWaveSamples( Wave wave )Load samples data from wave as a 32bit float data array
+wave = RL.WaveCopy( Wave wave )Copy a wave to a new wave
+RL.WaveCrop( Wave wave, int initSample, int finalSample )Crop a wave to defined samples range
music = RL.LoadMusicStream( string fileName )Load music stream from file
+music = RL.LoadMusicStreamFromMemory( string fileType, Buffer data )Load music stream from data
+isValid = RL.IsMusicValid( Music music )Checks if a music stream is valid (context and buffers initialized)
+RL.UnloadMusicStream( Music music )Unload music stream
RL.PlayMusicStream( Music music )Start music playing
playing = RL.IsMusicStreamPlaying( Music music )Check if music is playing
+RL.UpdateMusicStream( Music music )Updates buffers for music streaming
RL.StopMusicStream( Music music )Stop music playing
RL.PauseMusicStream( Music music )Pause music playing
RL.ResumeMusicStream( Music music )Resume playing paused music
RL.SeekMusicStream( Music music, float position )Seek music to a position (in seconds)
RL.SetMusicVolume( Music music, float volume )Set volume for music (1.0 is max level)
RL.SetMusicPitch( Music music, float pitch )Set pitch for a music (1.0 is base level)
RL.SetMusicPan( Music music, float pan )Set pan for a music (0.5 is center)
RL.SetMusicLooping( Music music, bool looping )Set looping for a music
looping = RL.GetMusicLooping( Music music )Get looping of a music
+length = RL.GetMusicTimeLength( Music music )Get music time length (in seconds)
+timePlayed = RL.GetMusicTimePlayed( Music music )Get current music time played (in seconds)
+stream = RL.GetMusicStream( Music music )Get music audio stream. Return as lightuserdata
+audioStream = RL.LoadAudioStream( int sampleRate, int sampleSize, int channels )Load audio stream (to stream raw audio pcm data)
+isValid = RL.IsAudioStreamValid( AudioStream stream )Checks if an audio stream is valid (buffers initialized)
+RL.UnloadAudioStream( AudioStream stream )Unload audio stream and free memory
RL.UpdateAudioStream( AudioStream stream, Buffer data, int frameCount )Update audio stream buffers with data
isProcessed = RL.IsAudioStreamProcessed( AudioStream stream )Check if any audio stream buffers requires refill
+RL.PlayAudioStream( AudioStream stream )Play audio stream
RL.PauseAudioStream( AudioStream stream )Pause audio stream
RL.ResumeAudioStream( AudioStream stream )Resume audio stream
isPlaying = RL.IsAudioStreamPlaying( AudioStream stream )Check if audio stream is playing
+RL.StopAudioStream( AudioStream stream )Stop audio stream
RL.SetAudioStreamVolume( AudioStream stream, float volume )Set volume for audio stream (1.0 is max level)
RL.SetAudioStreamPitch( AudioStream stream, float pitch )Set pitch for audio stream (1.0 is base level)
RL.SetAudioStreamPan( AudioStream stream, float pan )Set pan for audio stream (0.5 is centered)
RL.SetAudioStreamBufferSizeDefault( int size )Default size for new audio streams
RL.SetAudioStreamCallback( AudioStream stream, AudioCallback callback )Audio thread callback to request new data. AudioCallback should be lightuserdata function pointer
RL.AttachAudioStreamProcessor( AudioStream stream, AudioCallback processor )Attach audio stream processor to stream, receives the samples as 'float'. AudioCallback should be lightuserdata function pointer
RL.DetachAudioStreamProcessor( AudioStream stream, AudioCallback processor )Detach audio stream processor from stream. AudioCallback should be lightuserdata function pointer
RL.AttachAudioMixedProcessor( AudioCallback processor )Attach audio stream processor to the entire audio pipeline, receives the samples as 'float'. AudioCallback should be lightuserdata function pointer
RL.DetachAudioMixedProcessor( AudioCallback processor )Detach audio stream processor from the entire audio pipeline. AudioCallback should be lightuserdata function pointer
result = RL.Round( float value )Round float value
+result = RL.Sign( float value )Sign of value
+result = RL.Clamp( float value, float min, float max )Clamp float value
+result = RL.Lerp( float a, float b, float amount )Calculate linear interpolation between two floats
+result = RL.Normalize( float value, float a, float b )Normalize input value within input range
+result = RL.Remap( float value, float inputStart, float inputEnd, float outputStart, float outputEnd )Remap input value within input range to output range
+result = RL.Wrap( float value, float min, float max )Wrap input value from min to max
+result = RL.FloatEquals( float x, float y )Check whether two given floats are almost equal
+result = RL.Vector2Zero()Vector with components value 0.0f
+result = RL.Vector2One()Vector with components value 1.0f
+result = RL.Vector2Add( Vector2 v1, Vector2 v2 )Add two vectors (v1 + v2)
+result = RL.Vector2AddValue( Vector2 v, float add )Add vector and float value
+result = RL.Vector2Subtract( Vector2 v1, Vector2 v2 )Subtract two vectors (v1 - v2)
+result = RL.Vector2SubtractValue( Vector2 v, float sub )Subtract vector by float value
+result = RL.Vector2Length( vector2 v )Calculate vector length
+result = RL.Vector2LengthSqr( vector2 v )Calculate vector square length
+result = RL.Vector2DotProduct( Vector2 v1, Vector2 v2 )Calculate two vectors dot product
+result = RL.Vector2Distance( Vector2 v1, Vector2 v2 )Calculate distance between two vectors
+result = RL.Vector2DistanceSqr( Vector2 v1, Vector2 v2 )Calculate square distance between two vectors
+result = RL.Vector2Angle( Vector2 v1, Vector2 v2 )Calculate angle between two vectors NOTE: Angle is calculated from origin point (0, 0)
+result = RL.Vector2LineAngle( Vector2 a, Vector2 b )Calculate angle defined by a two vectors line NOTE: Parameters need to be normalized Current implementation should be aligned with glm::angle
+result = RL.Vector2Scale( Vector2 v, float scale )Scale vector (multiply by value)
+result = RL.Vector2Multiply( Vector2 v1, Vector2 v2 )Multiply vector by vector
+result = RL.Vector2Negate( Vector2 v )Negate vector
+result = RL.Vector2Divide( Vector2 v1, Vector2 v2 )Divide vector by vector
+result = RL.Vector2Normalize( Vector2 v )Normalize provided vector
+result = RL.Vector2Transform( Vector2 v, Matrix mat )Transforms a Vector2 by a given Matrix
+result = RL.Vector2Lerp( Vector2 v1, Vector2 v2, float amount )Calculate linear interpolation between two vectors
+result = RL.Vector2Reflect( Vector2 v, Vector2 normal )Calculate reflected vector to normal
+result = RL.Vector2Min( Vector2 v1, Vector2 v2 )Get min value for each pair of components
+result = RL.Vector2Max( Vector2 v1, Vector2 v2 )Get max value for each pair of components
+result = RL.Vector2Rotate( Vector2 v, float angle )Rotate vector by angle
+result = RL.Vector2MoveTowards( Vector2 v, Vector2 target, float maxDistance )Move Vector towards target
+result = RL.Vector2Invert( Vector2 v )Invert the given vector
+result = RL.Vector2Clamp( Vector2 v, Vector2 min, Vector2 max )Clamp the components of the vector between min and max values specified by the given vectors
+result = RL.Vector2ClampValue( Vector2 v, float min, float max )Clamp the magnitude of the vector between two min and max values
+result = RL.Vector2Equals( Vector2 v1, Vector2 v2 )Check whether two given vectors are almost equal
+result = RL.Vector2Refract( Vector2 v, Vector2 n, float r )Compute the direction of a refracted ray v: normalized direction of the incoming ray n: normalized normal vector of the interface of two optical media r: ratio of the refractive index of the medium from where the ray comes to the refractive index of the medium on the other side of the surface
+result = RL.Vector3Zero()Vector with components value 0.0f
+result = RL.Vector3One()Vector with components value 1.0f
+result = RL.Vector3Add( Vector3 v1, Vector3 v2 )Add two vectors
+result = RL.Vector3AddValue( Vector3 v, float add )Add vector and float value
+result = RL.Vector3Subtract( Vector3 v1, Vector3 v2 )Subtract two vectors
+result = RL.Vector3SubtractValue( Vector3 v, float sub )Subtract vector by float value
+result = RL.Vector3Scale( Vector3 v, float scalar )Multiply vector by scalar
+result = RL.Vector3Multiply( Vector3 v1, Vector3 v2 )Multiply vector by vector
+result = RL.Vector3CrossProduct( Vector3 v1, Vector3 v2 )Calculate two vectors cross product
+result = RL.Vector3Perpendicular( Vector3 v )Calculate one vector perpendicular vector
+result = RL.Vector3Length( Vector3 v )Calculate vector length
+result = RL.Vector3LengthSqr( Vector3 v )Calculate vector square length
+result = RL.Vector3DotProduct( Vector3 v1, Vector3 v2 )Calculate two vectors dot product
+result = RL.Vector3Distance( Vector3 v1, Vector3 v2 )Calculate distance between two vectors
+result = RL.Vector3DistanceSqr( Vector3 v1, Vector3 v2 )Calculate square distance between two vectors
+result = RL.Vector3Angle( Vector3 v1, Vector3 v2 )Calculate angle between two vectors
+result = RL.Vector3Negate( Vector3 v )Negate provided vector (invert direction)
+result = RL.Vector3Divide( Vector3 v1, Vector3 v2 )Divide vector by vector
+result = RL.Vector3Normalize( Vector3 v )Normalize provided vector
+result = RL.Vector3Project( Vector3 v1, Vector3 v2 )Calculate the projection of the vector v1 on to v2
+result = RL.Vector3Reject( Vector3 v1, Vector3 v2 )Calculate the rejection of the vector v1 on to v2
+v1, v2 = RL.Vector3OrthoNormalize( Vector3 v1, Vector3 v2 )Orthonormalize provided vectors. Makes vectors normalized and orthogonal to each other. Gram-Schmidt function implementation
+result = RL.Vector3Transform( Vector3 v, Matrix mat )Transforms a Vector3 by a given Matrix
+result = RL.Vector3RotateByQuaternion( Vector3 v, Quaternion q )Transform a vector by quaternion rotation
+result = RL.Vector3RotateByAxisAngle( Vector3 v, Vector3 axis, float angle )Rotates a vector around an axis
+result = RL.Vector3MoveTowards( Vector3 v, Vector3 target, float maxDistance )Move Vector towards target
+result = RL.Vector3Lerp( Vector3 v1, Vector3 v2, float amount )Calculate linear interpolation between two vectors
+result = RL.Vector3CubicHermite( Vector3 v1, Vector3 tangent1, Vector3 v2, Vector3 tangent2, float amount )Calculate cubic hermite interpolation between two vectors and their tangents as described in the GLTF 2.0 specification: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#interpolation-cubic
+result = RL.Vector3Reflect( Vector3 v, Vector3 normal )Calculate reflected vector to normal
+result = RL.Vector3Min( Vector3 v1, Vector3 v2 )Get min value for each pair of components
+result = RL.Vector3Max( Vector3 v1, Vector3 v2 )Get max value for each pair of components
+result = RL.Vector3Barycenter( Vector3 p, Vector3 a, Vector3 b, Vector3 c )Compute barycenter coordinates (u, v, w) for point p with respect to triangle (a, b, c) NOTE: Assumes P is on the plane of the triangle
+result = RL.Vector3Unproject( Vector3 source, Matrix projection, Matrix view )Projects a Vector3 from screen space into object space NOTE: We are avoiding calling other raymath functions despite available
+result = RL.Vector3Invert( Vector3 v )Invert the given vector
+result = RL.Vector3Clamp( Vector3 v, Vector3 min, Vector3 max )Clamp the components of the vector between min and max values specified by the given vectors
+result = RL.Vector3ClampValue( Vector3 v, float min, float max )Clamp the magnitude of the vector between two values
+result = RL.Vector3Equals( Vector3 v1, Vector3 v2 )Check whether two given vectors are almost equal
+result = RL.Vector3Refract( Vector3 v, Vector3 n, float r )Compute the direction of a refracted ray where v specifies the normalized direction of the incoming ray, n specifies the normalized normal vector of the interface of two optical media, and r specifies the ratio of the refractive index of the medium from where the ray comes to the refractive index of the medium on the other side of the surface
+result = RL.Vector4Zero()Vector with components value 0.0f
+result = RL.Vector4One()Vector with components value 1.0f
+result = RL.Vector4Add( Vector4 v1, Vector4 v2 )Add two vectors
+result = RL.Vector4AddValue( Vector4 v, float add )Add vector and float value
+result = RL.Vector4Subtract( Vector4 v1, Vector4 v2 )Subtract two vectors
+result = RL.Vector4SubtractValue( Vector4 v, float sub )Subtract vector by float value
+result = RL.Vector4Length( Vector4 v )Calculate vector length
+result = RL.Vector4LengthSqr( Vector4 v )Calculate vector square length
+result = RL.Vector4DotProduct( Vector4 v1, Vector4 v2 )Calculate two vectors dot product
+result = RL.Vector4Distance( Vector4 v1, Vector4 v2 )Calculate distance between two vectors
+result = RL.Vector4DistanceSqr( Vector4 v1, Vector4 v2 )Calculate square distance between two vectors
+result = RL.Vector4Scale( Vector4 v, float scalar )Multiply vector by scalar
+result = RL.Vector4Multiply( Vector4 v1, Vector4 v2 )Multiply vector by vector
+result = RL.Vector4Negate( Vector4 v )Negate provided vector (invert direction)
+result = RL.Vector4Divide( Vector4 v1, Vector4 v2 )Divide vector by vector
+result = RL.Vector4Normalize( Vector4 v )Normalize provided vector
+result = RL.Vector4Min( Vector4 v1, Vector4 v2 )Get min value for each pair of components
+result = RL.Vector4Max( Vector4 v1, Vector4 v2 )Get max value for each pair of components
+result = RL.Vector4Lerp( Vector4 v1, Vector4 v2, float amount )Calculate linear interpolation between two vectors
+result = RL.Vector4MoveTowards( Vector4 v, Vector4 target, float maxDistance )Move Vector towards target
+result = RL.Vector4Invert( Vector4 v )Invert the given vector
+result = RL.Vector4Equals( Vector4 v1, Vector4 v2 )Check whether two given vectors are almost equal
+result = RL.MatrixDeterminant( Matrix mat )Compute matrix determinant
+result = RL.MatrixTrace( Matrix mat )Get the trace of the matrix (sum of the values along the diagonal)
+result = RL.MatrixTranspose( Matrix mat )Transposes provided matrix
+result = RL.MatrixInvert( Matrix mat )Invert provided matrix
+result = RL.MatrixIdentity()Get identity matrix
+result = RL.MatrixAdd( Matrix left, Matrix right )Add two matrices
+result = RL.MatrixSubtract( Matrix left, Matrix right )Subtract two matrices (left - right)
+result = RL.MatrixMultiply( Matrix left, Matrix right )Get two matrix multiplication
+result = RL.MatrixTranslate( Vector3 translate )Get translation matrix
+result = RL.MatrixRotate( Vector3 axis, float angle )Create rotation matrix from axis and angle. NOTE: Angle should be provided in radians
+result = RL.MatrixRotateX( float angle )Get x-rotation matrix (angle in radians)
+result = RL.MatrixRotateY( float angle )Get y-rotation matrix (angle in radians)
+result = RL.MatrixRotateZ( float angle )Get z-rotation matrix (angle in radians)
+result = RL.MatrixRotateXYZ( Vector3 angles )Get xyz-rotation matrix (angles in radians)
+result = RL.MatrixRotateZYX( Vector3 angles )Get zyx-rotation matrix (angles in radians)
+result = RL.MatrixScale( Vector3 scale )Get scaling matrix
+result = RL.MatrixFrustum( double left, double right, double bottom, double top, double near, double far )Get perspective projection matrix
+result = RL.MatrixPerspective( double fovy, double aspect, double near, double far )Get perspective projection matrix
+result = RL.MatrixOrtho( double left, double right, double bottom, double top, double near, double far )Get orthographic projection matrix
+result = RL.MatrixLookAt( Vector3 eye, Vector3 target, Vector3 up )Get camera look-at matrix (View matrix)
+translation, rotation, scale = RL.MatrixDecompose( Matrix mat )Decompose a transformation matrix into its rotational, translational and scaling components
+result = RL.QuaternionAdd( Quaternion q1, Quaternion q2 )Add two quaternions
+result = RL.QuaternionAddValue( Quaternion q, float add )Add quaternion and float value
+result = RL.QuaternionSubtract( Quaternion q1, Quaternion q2 )Subtract two quaternions
+result = RL.QuaternionSubtractValue( Quaternion q, float sub )Subtract quaternion and float value
+result = RL.QuaternionIdentity()Get identity quaternion
+result = RL.QuaternionLength( Quaternion q )Computes the length of a quaternion
+result = RL.QuaternionNormalize( Quaternion q )Normalize provided quaternion
+result = RL.QuaternionInvert( Quaternion q )Invert provided quaternion
+result = RL.QuaternionMultiply( Quaternion q1, Quaternion q2 )Calculate two quaternion multiplication
+result = RL.QuaternionScale( Quaternion q, float mul )Scale quaternion by float value
+result = RL.QuaternionDivide( Quaternion q1, Quaternion q2 )Divide two quaternions
+result = RL.QuaternionLerp( Quaternion q1, Quaternion q2, float amount )Calculate linear interpolation between two quaternions
+result = RL.QuaternionNlerp( Quaternion q1, Quaternion q2, float amount )Calculate slerp-optimized interpolation between two quaternions
+result = RL.QuaternionSlerp( Quaternion q1, Quaternion q2, float amount )Calculates spherical linear interpolation between two quaternions
+result = RL.QuaternionCubicHermiteSpline( Quaternion q1, Quaternion outTangent1, Quaternion q2, Quaternion inTangent2, float t )Calculate quaternion cubic spline interpolation using Cubic Hermite Spline algorithm as described in the GLTF 2.0 specification: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#interpolation-cubic
+result = RL.QuaternionFromVector3ToVector3( Vector3 from, Vector3 to )Calculate quaternion based on the rotation from one vector to another
+result = RL.QuaternionFromMatrix( Matrix mat )Get a quaternion for a given rotation matrix
+result = RL.QuaternionToMatrix( Quaternion q )Get a matrix for a given quaternion
+result = RL.QuaternionFromAxisAngle( Vector3 axis, float angle )Get rotation quaternion for an angle and axis NOTE: angle must be provided in radians
+axis, angle = RL.QuaternionToAxisAngle( Quaternion q )Get the rotation angle and axis for a given quaternion
+result = RL.QuaternionFromEuler( float pitch, float yaw, float roll )Get the quaternion equivalent to Euler angles NOTE: Rotation order is ZYX
+result = RL.QuaternionToEuler( Quaternion q )Get the Euler angles equivalent to quaternion (roll, pitch, yaw) NOTE: Angles are returned in a Vector3 struct in radians
+result = RL.QuaternionTransform( Quaternion q, Matrix mat )Transform a quaternion given a transformation matrix
+result = RL.QuaternionEquals( Quaternion q1, Quaternion q2 )Check whether two given quaternions are almost equal
+frustum = RL.ExtractFrustum( Matrix projection, Matrix modelview )Extract frustum from projection and modelView matrices.
+inFrustum = RL.PointInFrustum( Vector4{} frustum, Vector3 position )Check if point inside frustum
+inFrustum = RL.SphereInFrustum( Vector4{} frustum, Vector3 position )Check if sphere inside frustum
+inFrustum = RL.AABBInFrustum( Vector4{} frustum, Vector3 min, Vector3 max )Check if AABB inside frustum
+RL.GuiEnable()Enable gui controls (global state)
RL.GuiDisable()Disable gui controls (global state)
RL.GuiLock()Lock gui controls (global state)
RL.GuiUnlock()Unlock gui controls (global state)
locked = RL.GuiIsLocked()Check if gui is locked (global state)
+RL.GuiSetAlpha( float alpha )Set gui controls alpha (global state), alpha goes from 0.0f to 1.0f
RL.GuiSetState( int state )Set gui state (global state)
state = RL.GuiGetState()Get gui state (global state)
+RL.GuiSetSliderDragging( bool dragging )Set guiSliderDragging
isSliderDragging = RL.GuiGetSliderDragging()Get guiSliderDragging
+RL.GuiSetSliderActive( Rectange rect )Set guiSliderActive
isSliderDragging = RL.GuiGetSliderActive()Get guiSliderActive
+RL.GuiSetFont( Font font )Set gui custom font (global state)
font = RL.GuiGetFont()Get gui font (global state). Return as lightuserdata
+RL.GuiSetStyle( int control, int property, int value )Set one style property
value = RL.GuiGetStyle( int control, int property )Get one style property
+success = RL.GuiLoadStyle( string fileName )Load style file over global style variable (.rgs)
+RL.GuiLoadStyleDefault()Load style default over global style
RL.GuiEnableTooltip()Enable gui tooltips (global state)
RL.GuiDisableTooltip()Disable gui tooltips (global state)
RL.GuiSetTooltip( string tooltip )Set tooltip string
text = RL.GuiIconText( int iconId, string|nil text )Get text with icon id prepended (if supported)
+RL.GuiSetIconScale( int scale )Set icon scale (1 by default)
iconsBuffer = RL.GuiGetIcons()Get raygui icons data in buffer. guiIcons size is by default: 256(1616/32) = 2048*4 = 8192 bytes = 8 KB
+success = RL.GuiSetIcons( Buffer iconBuffer )Set raygui icons data in buffer. guiIcons size is by default: 256(1616/32) = 2048*4 = 8192 bytes = 8 KB
+iconNames = RL.GuiLoadIcons( string fileName, bool loadIconsName )Load raygui icons file (.rgi) into internal icons data
+RL.GuiDrawIcon( int iconId, Vector2 pos, int pixelSize, Color color )Draw icon
result = RL.GuiWindowBox( Rectangle bounds, string|nil title )Window Box control, shows a window that can be closed
+result = RL.GuiGroupBox( Rectangle bounds, string|nil text )Group Box control with text name
+result = RL.GuiLine( Rectangle bounds, string|nil text )Line separator control, could contain text
+result = RL.GuiPanel( Rectangle bounds, string|nil text )Panel control, useful to group controls
+result, active = RL.GuiTabBar( Rectangle bounds, string text, int active )Tab Bar control, returns TAB to be closed or -1
+result, scroll, view = RL.GuiScrollPanel( Rectangle bounds, string|nil text, Rectangle content, Vector2 scroll, Rectangle view )Scroll Panel control
+result = RL.GuiLabel( Rectangle bounds, string|nil text )Label control, shows text
+result = RL.GuiButton( Rectangle bounds, string|nil text )Button control, returns true when clicked
+result = RL.GuiLabelButton( Rectangle bounds, string|nil text )Label button control, show true when clicked
+result, active = RL.GuiToggle( Rectangle bounds, string|nil text, bool active )Toggle Button control, returns true when active
+result, active = RL.GuiToggleGroup( Rectangle bounds, string|nil text, int active )Toggle Group control, returns active toggle index
+result, active = RL.GuiToggleSlider( Rectangle bounds, string|nil text, int active )Toggle Slider control, returns true when clicked
+result, checked, textBounds = RL.GuiCheckBox( Rectangle bounds, string|nil text, bool checked )Check Box control, returns true when active
+result, active = RL.GuiComboBox( Rectangle bounds, string|nil text, int active )Combo Box control, returns selected item index
+result, active = RL.GuiDropdownBox( Rectangle bounds, string text, int active, bool editMode )Dropdown Box control, returns selected item
+result, value, textBounds = RL.GuiSpinner( Rectangle bounds, string|nil text, int value, int minValue, int maxValue, bool editMode )Spinner control, returns selected value
+result, value, textBounds = RL.GuiValueBox( Rectangle bounds, string|nil text, int value, int minValue, int maxValue, bool editMode )Value Box control, updates input text with numbers
+result, text = RL.GuiTextBox( Rectangle bounds, string text, int bufferSize, bool editMode )Text Box control, updates input text
+result, value, textLeftBounds, textRightBounds = RL.GuiSlider( Rectangle bounds, string|nil textLeft, string|nil textRight, float value, float minValue, float maxValue )Slider control, returns selected value
+result, value, textLeftBounds, textRightBounds = RL.GuiSliderBar( Rectangle bounds, string|nil textLeft, string|nil textRight, float value, float minValue, float maxValue )Slider Bar control, returns selected value
+result, value, textLeftBounds, textRightBounds = RL.GuiProgressBar( Rectangle bounds, string|nil textLeft, string|nil textRight, float value, float minValue, float maxValue )Progress Bar control, shows current progress value
+result = RL.GuiStatusBar( Rectangle bounds, string|nil text )Status Bar control, shows info text
+result = RL.GuiDummyRec( Rectangle bounds, string|nil text )Dummy control for placeholders
+result, mouseCell = RL.GuiGrid( Rectangle bounds, string|nil text, float spacing, int subdivs, Vector2 mouseCell )Grid control, returns mouse cell position
+value = RL.GuiScrollBar( Rectangle bounds, int value, int minValue, int maxValue )Scroll bar control
+result, scrollIndex, active = RL.GuiListView( Rectangle bounds, string|nil text, int scrollIndex, int active )List View control, returns selected list item index
+result, scrollIndex, active, focus = RL.GuiListViewEx( Rectangle bounds, string text, int scrollIndex, int active, int focus )List View with extended parameters
+result = RL.GuiMessageBox( Rectangle bounds, string|nil title, string message, string buttons )Message Box control, displays a message
+result, text, secretViewActive = RL.GuiTextInputBox( Rectangle bounds, string title, string message, string buttons, string text, int textMaxSize, bool secretViewActive )Text Input Box control, ask for text, supports secret
+result, color = RL.GuiColorPicker( Rectangle bounds, string|nil text, Color color )Color Picker control (multiple color controls)
+result, color = RL.GuiColorPanel( Rectangle bounds, string|nil text, Color color )Color Panel control
+result, alpha = RL.GuiColorBarAlpha( Rectangle bounds, string|nil text, float alpha )Color Bar Alpha control
+result, value = RL.GuiColorBarHue( Rectangle bounds, string|nil text, float value )Color Bar Hue control
+result, colorHsv = RL.GuiColorPickerHSV( Rectangle bounds, string|nil text, Vector3 colorHsv )Color Picker control that avoids conversion to RGB on each call (multiple color controls)
+result, colorHsv = RL.GuiColorPanelHSV( Rectangle bounds, string|nil text, Vector3 colorHsv )Color Panel control that returns HSV color value, used by GuiColorPickerHSV()
+light = RL.CreateLight( int type, Vector3 position, Vector3 target, Color color, Shader shader )Create a light and get shader locations
+RL.UpdateLightValues( Shader shader, Light light )Send light properties to shader
RL.SetLightType( Light light, int type )Set light type
RL.SetLightPosition( Light light, Vector3 position )Set light position
RL.SetLightTarget( Light light, Vector3 target )Set light target
RL.SetLightColor( Light light, Color color )Set light color
RL.SetLightEnabled( Light light, bool enabled )Set light enabled
type = RL.GetLightType( Light light )Get light type
+position = RL.GetLightPosition( Light light )Get light position
+target = RL.GetLightTarget( Light light )Get light target
+color = RL.GetLightColor( Light light )Get light color
+enabled = RL.IsLightEnabled( Light light )Get light enabled
+RL.rlMatrixMode( int mode )Choose the current matrix to be transformed
RL.rlPushMatrix()Push the current matrix to stack
RL.rlPopMatrix()Pop latest inserted matrix from stack
RL.rlLoadIdentity()Reset current matrix to identity matrix
RL.rlTranslatef( Vector3 translation )Multiply the current matrix by a translation matrix
RL.rlRotatef( float angle, Vector3 rotation )Multiply the current matrix by a rotation matrix
RL.rlScalef( Vector3 scale )Multiply the current matrix by a scaling matrix
RL.rlMultMatrixf( Matrix matrix )Multiply the current matrix by another matrix
RL.rlFrustum( float left, float right, float bottom, float top, float znear, float zfar )Multiply the current matrix by a perspective matrix generated by parameters
RL.rlOrtho( float left, float right, float bottom, float top, float znear, float zfar )Multiply the current matrix by an orthographic matrix generated by parameters
RL.rlViewport( Rectangle viewport )Set the viewport area (transformation from normalized device coordinates to window coordinates) NOTE: We store current viewport dimensions
RL.rlSetClipPlanes( float nearPlane, float farPlane )Set clip planes distances
distance = RL.rlGetCullDistanceNear()Get cull plane distance near
+distance = RL.rlGetCullDistanceFar()Get cull plane distance far
+RL.rlBegin( int mode )Initialize drawing mode (how to organize vertex)
RL.rlEnd()Finish vertex providing
RL.rlVertex2f( Vector2 position )Define one vertex (position)
RL.rlVertex3f( Vector3 position )Define one vertex (position)
RL.rlTexCoord2f( Vector2 texCoord )Define one vertex (texture coordinate) - 2 float
RL.rlNormal3f( Vector3 normal )Define one vertex (normal) - 3 float
RL.rlColor4ub( Color color )Define one vertex (color) - 4 byte
RL.rlColor3f( Vector3 color )Define one vertex (color) - 3 float
RL.rlColor4f( Vector4 color )Define one vertex (color) - 4 float
supported = RL.rlEnableVertexArray( int vaoId )Enable vertex array (VAO, if supported)
+RL.rlDisableVertexArray()Disable vertex array (VAO, if supported)
RL.rlEnableVertexBuffer( int id )Enable vertex buffer (VBO)
+RL.rlDisableVertexBuffer()Disable vertex buffer (VBO)
RL.rlEnableVertexBufferElement( int id )Enable vertex buffer element (VBO element)
RL.rlDisableVertexBufferElement()Disable vertex buffer element (VBO element)
RL.rlEnableVertexAttribute( int index )Enable vertex attribute index
RL.rlDisableVertexAttribute( int index )Disable vertex attribute index
RL.rlEnableStatePointer( int vertexAttribType, Buffer buffer )Enable attribute state pointer
RL.rlDisableStatePointer( int vertexAttribType )Disable attribute state pointer
RL.rlActiveTextureSlot( int slot )Select and active a texture slot
RL.rlEnableTexture( int id )Enable texture
RL.rlDisableTexture()Disable texture
RL.rlEnableTextureCubemap( int id )Enable texture cubemap
RL.rlDisableTextureCubemap()Disable texture cubemap
RL.rlTextureParameters( int id, int param, int value )Set texture parameters (filter, wrap)
RL.rlCubemapParameters( int id, int param, int value )Set cubemap parameters (filter, wrap)
RL.rlEnableShader( int id )Enable shader program
RL.rlDisableShader()Disable shader program
RL.rlEnableFramebuffer( int id )Enable render texture (fbo)
RL.rlDisableFramebuffer()Disable render texture (fbo), return to default framebuffer
framebuffer = RL.rlGetActiveFramebuffer()Get the currently active render texture (fbo), 0 for default framebuffer
+RL.rlActiveDrawBuffers( int count )Activate multiple draw color buffers
RL.rlBlitFramebuffer( Rectangle srcRect, Rectangle dstRect, int bufferMask )Blit active framebuffer to main framebuffer
RL.rlBindFramebuffer( int target, int framebuffer )Bind framebuffer (FBO)
RL.rlEnableColorBlend()Enable color blending
RL.rlDisableColorBlend()Disable color blending
RL.rlEnableDepthTest()Enable depth test
RL.rlDisableDepthTest()Disable depth test
RL.rlEnableDepthMask()Enable depth write
RL.rlDisableDepthMask()Disable depth write
RL.rlEnableBackfaceCulling()Enable backface culling
RL.rlDisableBackfaceCulling()Disable backface culling
RL.rlColorMask( bool r, bool g, bool b, bool a )Color mask control
RL.rlSetCullFace( int mode )Set face culling mode
RL.rlEnableScissorTest()Enable scissor test
RL.rlDisableScissorTest()Disable scissor test
RL.rlScissor( Rectangle area )Scissor test
RL.rlEnableWireMode()Enable wire mode
RL.rlEnablePointMode()Enable point mode
RL.rlDisableWireMode()Disable wire mode
RL.rlSetLineWidth( float width )Set the line drawing width
width = RL.rlGetLineWidth()Get the line drawing width
+RL.rlEnableSmoothLines()Enable line aliasing
RL.rlDisableSmoothLines()Disable line aliasing
RL.rlEnableStereoRender()Enable stereo rendering
RL.rlDisableStereoRender()Enable stereo rendering
enabled = RL.rlIsStereoRenderEnabled()Check if stereo render is enabled
+RL.rlClearColor( Color color )Clear color buffer with color
RL.rlClearScreenBuffers()Clear used screen buffers (color and depth)
RL.rlCheckErrors()Check and log OpenGL error codes
RL.rlSetBlendMode( int mode )Set blending mode
RL.rlSetBlendFactors( int glSrcFactor, int glDstFactor, int glEquation )Set blending mode factor and equation (using OpenGL factors)
RL.rlSetBlendFactorsSeparate( int glSrcRGB, int glDstRGB, int glSrcAlpha, int glDstAlpha, int glEqRGB, int glEqAlpha )Set blending mode factors and equations separately (using OpenGL factors)
version = RL.rlGetVersion()Get current OpenGL version
+version = RL.rlSetFramebufferWidth( int width )Set current framebuffer width
width = RL.rlGetFramebufferWidth()Get default framebuffer width
+version = RL.rlSetFramebufferHeight( int height )Set current framebuffer height
height = RL.rlGetFramebufferHeight()Get default framebuffer height
+id = RL.rlGetTextureIdDefault()Get default texture id
+id = RL.rlGetShaderIdDefault()Get default shader id
+locations = RL.rlGetShaderLocsDefault()Get default shader locations
+renderBatch = RL.rlLoadRenderBatch( int numBuffers, int bufferElements )Load a render batch system
+RL.rlUnloadRenderBatch( rlRenderBatch renderBatch )Unload render batch system
RL.rlDrawRenderBatch( rlRenderBatch renderBatch )Draw render batch data (Update->Draw->Reset)
RL.rlSetRenderBatchActive( rlRenderBatch renderBatch )Set the active render batch for rlgl (nil for default internal)
RL.rlDrawRenderBatchActive()Update and draw internal render batch
overflow = RL.rlCheckRenderBatchLimit( int vCount )Check internal buffer overflow for a given number of vertex and force a rlRenderBatch draw call if required
+RL.rlSetTexture( int id )Set current texture for render batch and check buffers limits
vaoId = RL.rlLoadVertexArray()Load vertex array (vao) if supported
+vboId = RL.rlLoadVertexBuffer( Buffer buffer, bool dynamic )Load a vertex buffer attribute
+vboId = RL.rlLoadVertexBufferElement( Buffer buffer, bool dynamic )Load a new attributes element buffer
+RL.rlUpdateVertexBuffer( int bufferId, Buffer buffer, int offset )Update GPU buffer with new data
RL.rlUpdateVertexBufferElements( int id, Buffer buffer, int offset )Update vertex buffer elements with new data
RL.rlUnloadVertexArray( int vaoId )Unload vertex array object (VAO)
RL.rlUnloadVertexBuffer( int vboId )Unload vertex buffer (VBO)
RL.rlSetVertexAttribute( int index, int compSize, int type, bool normalized, int stride, int offset )Set vertex attribute data configuration
RL.rlSetVertexAttributeDivisor( int index, int divisor )Set vertex attribute divisor
RL.rlSetVertexAttributeDefault( int locIndex, float{} value, int attribType )Set vertex attribute default value
RL.rlDrawVertexArray( int offset, int count )Draw vertex array
RL.rlDrawVertexArrayElements( int offset, int count, Buffer buffer )Draw vertex array elements
RL.rlDrawVertexArrayInstanced( int offset, int count, int instances )Draw vertex array instanced
RL.rlDrawVertexArrayElementsInstanced( int offset, int count, Buffer buffer, int instances )Draw vertex array elements instanced
id = RL.rlLoadTexture( Buffer data, Vector2 size, int format, int mipmapCount )Load texture in GPU
+id = RL.rlLoadTextureDepth( Vector2 size, bool useRenderBuffer )Load depth texture/renderbuffer (to be attached to fbo)
+id = RL.rlLoadTextureCubemap( Buffer data, int size, int format, int mipmapCount )Load texture cubemap data
+RL.rlUpdateTexture( int id, Vector2 offset, Vector2 size, int format, Buffer data )Update GPU texture with new data
glInternalFormat, glFormat, glType = RL.rlGetGlTextureFormats( int format )Get OpenGL internal formats
+name = RL.rlGetPixelFormatName( int format )Get name string for pixel format
+RL.rlUnloadTexture( int id )Unload texture from GPU memory
mipmapCount = RL.rlGenTextureMipmaps( int id, Vector2 size, int format )Generate mipmap data for selected texture
+data = RL.rlReadTexturePixels( int id, Vector2 size, int format )Read texture pixel data
+data = RL.rlReadScreenPixels( Vector2 size )Read screen pixel data (color buffer)
+fboId = RL.rlLoadFramebuffer()Load an empty framebuffer
+RL.rlFramebufferAttach( int fboId, int texId, int attachType, int texType, int mipLevel )Attach texture/renderbuffer to a framebuffer
isComplete = RL.rlFramebufferComplete( int id )Verify framebuffer is complete
+RL.rlUnloadFramebuffer( int id )Delete framebuffer from GPU
shaderId = RL.rlLoadShaderCode( string vsCode, string fsCode )Load shader from code strings
+shaderId = RL.rlCompileShader( string shaderCode, int type )Compile custom shader and return shader id (type: RL_VERTEX_SHADER, RL_FRAGMENT_SHADER, RL_COMPUTE_SHADER)
+shaderProgramId = RL.rlLoadShaderProgram( int vShaderId, int fShaderId )Load custom shader program
+RL.rlUnloadShaderProgram( int id )Unload shader program
location = RL.rlGetLocationUniform( int shaderId, string uniformName )Get shader location uniform
+location = RL.rlGetLocationAttrib( int shaderId, string attribName )Get shader location attribute
+RL.rlSetUniform( int locIndex, Buffer value, int uniformType, int count )Set shader value uniform
RL.rlSetUniformMatrix( int locIndex, Matrix mat )Set shader value matrix
RL.rlSetUniformMatrices( int locIndex, Matrix{} mat )Set shader value matrices
RL.rlSetUniformSampler( int locIndex, int textureId )Set shader value sampler
RL.rlSetShader( int id, int{} locs )Set shader currently active (id and locations)
programId = RL.rlLoadComputeShaderProgram( int shaderId )Load compute shader program
+RL.rlComputeShaderDispatch( int groupX, int groupY, int groupZ )Dispatch compute shader (equivalent to draw for graphics pipeline)
buffer = RL.rlLoadShaderBuffer( int size, Buffer data, int usageHint )Load shader storage buffer object (SSBO)
+RL.rlUnloadShaderBuffer( int ssboId )Unload shader storage buffer object (SSBO)
RL.rlUpdateShaderBuffer( int id, Buffer data, int offset )Update SSBO buffer data
RL.rlBindShaderBuffer( int id, int index )Bind SSBO buffer
data = RL.rlReadShaderBuffer( int id, int count, int offset )Read SSBO buffer data (GPU->CPU)
+RL.rlCopyShaderBuffer( int destId, int srcId, int destOffset, int srcOffset, int count )Copy SSBO data between buffers
size = RL.rlGetShaderBufferSize( int id )Get SSBO buffer size
+RL.rlBindImageTexture( int id, int index, int format, bool readonly )Bind image texture
modelview = RL.rlGetMatrixModelview()Get internal modelview matrix
+projection = RL.rlGetMatrixProjection()Get internal projection matrix
+transform = RL.rlGetMatrixTransform()Get internal accumulated transform matrix
+projection = RL.rlGetMatrixProjectionStereo( int eye )Get internal projection matrix for stereo render (selected eye)
+viewOffset = RL.rlGetMatrixViewOffsetStereo( int eye )Get internal view offset matrix for stereo render (selected eye)
+RL.rlSetMatrixProjection( Matrix proj )Set a custom projection matrix (replaces internal projection matrix)
RL.rlSetMatrixModelview( Matrix view )Set a custom modelview matrix (replaces internal modelview matrix)
RL.rlSetMatrixProjectionStereo( Matrix right, Matrix left )Set eyes projection matrices for stereo rendering
RL.rlSetMatrixViewOffsetStereo( Matrix right, Matrix left )Set eyes view offsets matrices for stereo rendering
RL.glClear( int mask )Clear buffers to preset values
RL.glBlitFramebuffer( RenderTexture srcTex, RenderTexture dstTex, Rectangle srcRect, Rectangle dstRect, int mask, int filter )Copy a block of pixels from one framebuffer object to another. Use nil RenderTexture for window framebuffer
RL.glDepthRange( float nearVal, float farVal )Specify mapping of depth values from normalized device coordinates to window coordinates
RL.glEnable( int cap )Enable server-side GL capabilities
RL.glDisable( int cap )Disable server-side GL capabilities
RL.glPolygonOffset( float factor, float units )Set the scale and units used to calculate depth values
RL.glStencilFunc( int func, int ref, int mask )Set front and back function and reference value for stencil testing
RL.glStencilFuncSeparate( int face, int func, int ref, int mask )Set front and/or back function and reference value for stencil testing
RL.glStencilMask( int mask )Control the front and back writing of individual bits in the stencil planes
RL.glStencilMaskSeparate( int face, int mask )Control the front and/or back writing of individual bits in the stencil planes
RL.glStencilOp( int sfail, int dpfail, int dppass )Set front and back stencil test actions
RL.glStencilOpSeparate( int face, int sfail, int dpfail, int dppass )Set front and back stencil test actions
connection = RL.glGetString( int name, int|nil index )Return a string describing the current GL connection. GL_EXTENSIONS returns the extension string supported by the implementation at index
+value = RL.EaseLinear( float t, float b, float c, float d )Ease linear
+value = RL.EaseSineIn( float t, float b, float c, float d )Ease sine in
+value = RL.EaseSineOut( float t, float b, float c, float d )Ease sine out
+value = RL.EaseSineInOut( float t, float b, float c, float d )Ease sine in out
+value = RL.EaseCircIn( float t, float b, float c, float d )Ease circle in
+value = RL.EaseCircOut( float t, float b, float c, float d )Ease circle out
+value = RL.EaseCircInOut( float t, float b, float c, float d )Ease circle in out
+value = RL.EaseCubicIn( float t, float b, float c, float d )Ease cubic in
+value = RL.EaseCubicOut( float t, float b, float c, float d )Ease cubic out
+value = RL.EaseCubicInOut( float t, float b, float c, float d )Ease cubic in out
+value = RL.EaseQuadIn( float t, float b, float c, float d )Ease quadratic in
+value = RL.EaseQuadOut( float t, float b, float c, float d )Ease quadratic out
+value = RL.EaseQuadInOut( float t, float b, float c, float d )Ease quadratic in out
+value = RL.EaseExpoIn( float t, float b, float c, float d )Ease exponential in
+value = RL.EaseExpoOut( float t, float b, float c, float d )Ease exponential out
+value = RL.EaseExpoInOut( float t, float b, float c, float d )Ease exponential in out
+value = RL.EaseBackIn( float t, float b, float c, float d )Ease back in
+value = RL.EaseBackOut( float t, float b, float c, float d )Ease back out
+value = RL.EaseBackInOut( float t, float b, float c, float d )Ease back in out
+value = RL.EaseBounceIn( float t, float b, float c, float d )Ease bounce in
+value = RL.EaseBounceOut( float t, float b, float c, float d )Ease bounce out
+value = RL.EaseBounceInOut( float t, float b, float c, float d )Ease bounce in out
+value = RL.EaseElasticIn( float t, float b, float c, float d )Ease elastic in
+value = RL.EaseElasticOut( float t, float b, float c, float d )Ease elastic out
+value = RL.EaseElasticInOut( float t, float b, float c, float d )Ease elastic in out
+result = RL.BitAnd( int a, int b )Equivalent to a & b in C
+result = RL.BitOr( int a, int b )Equivalent to a | b in C
+result = RL.BitXor( int a, int b )Equivalent to a ^ b in C
+result = RL.BitNot( int v )Equivalent to ~v in C
+result = RL.BitShiftLeft( int v, int n )Equivalent to v << n in C
+result = RL.BitShiftRight( int v, int n )Equivalent to v >> n in C
+result = RL.BitSet( int v, int i, bool b )Set bit in index i to state b in value v
+bit = RL.BitGet( int v, int i )Get bit in index i from value v
+result = RL.BitToggle( int v, int i )Toggle bit in index i in value v
+keyName = RL.GetKeyName( int key, int scancode )This function returns the name of the specified printable key, encoded as UTF-8. If the key is KEY_UNKNOWN, the scancode is used to identify the key, otherwise the scancode is ignored. If you specify a non-printable key, or KEY_UNKNOWN and a scancode that maps to a non-printable key, this function returns nil but does not emit an error.
+scancode = RL.GetKeyScancode( int key )This function returns the platform-specific scancode of the specified key. If the key is KEY_UNKNOWN or does not exist on the keyboard this method will return -1.
+GLFWwindowsizeEvent = { int type, int width, int height }Called when the window is resized. Type GLFW_WINDOW_SIZE_EVENT
GLFWwindowmaximizeEvent = { int type, int maximized }Called when the window is maximized or restored. Type GLFW_WINDOW_MAXIMIZE_EVENT
GLFWwindowiconifyEvent = { int type, int iconified }Called when the window is iconified or restored. Type GLFW_WINDOW_ICONYFY_EVENT
GLFWwindowfocusEvent = { int type, int focused }Called when the window gains or loses input focus. Type GLFW_WINDOW_FOCUS_EVENT
GLFWdropEvent = { int type, int count, string{} paths }Called when files are dropped to the window. Type GLFW_WINDOW_DROP_EVENT
GLFWkeyEvent = { int type, int key, int scancode, int action, int mods }Called when a physical key is pressed or released or when it repeats. Type GLFW_KEY_EVENT
GLFWcharEvent = { int type, int key }Unicode code points for key events that would have led to regular text input and generally behaves as a standard text field on that platform. Type GLFW_CHAR_EVENT
GLFWmousebuttonEvent = { int type, int button, int action, int mods }Called when a mouse button is pressed or released. Type GLFW_MOUSE_BUTTON_EVENT
GLFWcursorposEvent = { int type, float x, float y }Called when the cursor moves over the window. Type GLFW_MOUSE_CURSOR_POS_EVENT
GLFWscrollEvent = { int type, float xoffset, float yoffset }Called when the user scrolls, whether with a mouse wheel or touchpad gesture. Type GLFW_MOUSE_SCROLL_EVENT
GLFWcursorenterEvent = { int type, int enter }Called when the cursor enters or leaves the content area of a window. Type GLFW_CURSOR_ENTER_EVENT
GLFWjoystickEvent = { int type, int jid, int event }Called when a joystick is connected or disconnected. Type GLFW_JOYSTICK_EVENT
GLFWpentabletdataEvent = { int type, float x, float y, float z, float pressure, float pitch, float yaw, float roll }Called when the pen tablet data is updated. Type GLFW_PEN_TABLET_DATA_EVENT NOTE: Experimental. Needs glfw PR https://github.com/glfw/glfw/pull/1445
GLFWpentabletcursorEvent = { int type, int identifier }Called when the pen tablet cursor has changed. Type GLFW_PEN_TABLET_CURSOR_EVENT NOTE: Experimental. Needs glfw PR https://github.com/glfw/glfw/pull/1445
GLFWpentabletproximityEvent = { int type, int proxState }Called when the pen tablet proximity has changed. Type GLFW_PEN_TABLET_PROXIMITY_EVENT NOTE: Experimental. Needs glfw PR https://github.com/glfw/glfw/pull/1445