A LuaJIT renderer + UI demo for [Clay], running on BGFX and GLFW via FFI.
Includes demo pages (corner radius, long lists, text alignment, floating inventory, UI controls, etc.).
A demonstration of clay_lua_bindings
- Clay UI elements and scrolling with pointer integration
- Text measurement and Rich Text parsing via
font_managerand stb truetype - BGFX rendering path (rectangle, rounded corners, borders, text, images)
- Demo pages: Home, Corner Radius, Long List, Text Alignment, Floating Inventory, UI Controls
main.lua— entry point; sets up window, bgfx, Clay, loads shaders, and runs the main loop.window.lua— GLFW window creation + callback plumbing exposed to Lua.font_manager.lua— text measuring utilities for Clay.demo/— demo page modules loaded dynamically by the app’s body.component/— UI components (checkbox, radio, slider, scrollbar, color picker, edit, property, listview, resizable).clay/— Clay C header (vendored).shader/— precompiled BGFX shaders (clay.vs.bin,clay.fs.bin).
- LuaJIT 2.1 (runtime + dev headers)
- BGFX shared library for your OS
- GLFW shared library
- Linux:
./run.sh - Windows:
run.bat
(These runluajit main.luafrom the repo root.)
Run make