accelerator — Luau Binding
require("accelerator"): choose the graphics backend, query the standard capability set, and control compositing. The programmatic surface of the software chipset and the two-backend model. Every function is[antos].
Status: design. Not built yet.
local accelerator = require("accelerator")
| Call | Returns | Does |
|---|---|---|
accelerator.target(which?) |
string |
get / set the default graphics target — "hardware" (FireStorm chipset), "top" (software over-plane), "bottom" (software under-plane), or "auto". Per-object choices override; see targeting a plane |
accelerator.alpha(mode?) |
number |
the top-plane transparency mode — 0 (chroma key: full colour, 1-bit, the fast path), 1 (6:6:6:6: 6-bit alpha on a 24-bit link), or 2 (8:8:8:6: full colour + 6-bit alpha on a 30-bit / 10:10:10 link, if the CM outputs 10-bit). This is the field's low nibble (top plane); 3–F and the high nibble (bottom plane) are reserved — see the mode field |
accelerator.available() |
bool |
is the hardware backend usable right now (a FireStorm chipset in the loaded FPGA image) |
accelerator.caps(backend?) |
table |
the capability set — { max_sprites, sprite_sizes, layers, palette, resolution } — the standard baseline for software, the actual limits for hardware |
accelerator.composite(opts) |
ok |
layer ordering vs the FPGA output and the OS UI — { over_fpga = true, under_ui = true } |
local accelerator = require("accelerator")
-- enhance whatever's running on the FPGA with a software overlay:
accelerator.target("top") -- draw on the top plane, above the guest
accelerator.alpha("rgb666a6") -- smooth per-pixel alpha over HDMI
accelerator.composite{ over_fpga = true, under_ui = true }
-- ...now sprites/particles/tilemaps drawn here overlay the emulated machine
Where to go next
- The Accelerator overview (this is its graphics arm) → accelerator
- The two-backend model and the standard chipset → Accelerator graphics
- What renders on it → sprite · tilemap · particles · the hardware chipset → FireStorm