Compiled programs could only write to the terminal, so the demo editor had no real window. When CMake finds SDL2 the runtime now exposes a `gui` table and Demo/guipaint.lua builds a 960x640 editor on top of it. Frames are collected in Lua, merged into horizontal runs and sent with a single `gui.rects` call: a full scene goes from 15071 draw calls and 42.9 ms per frame to 1522 calls and 2.1 ms, and the rendered screenshot stays pixel-identical.
9 lines
335 B
Plaintext
9 lines
335 B
Plaintext
// Generated by CMake: paths and flags luacpp bakes in to compile and link the
|
|
// C++ it generates for `luacpp run`.
|
|
#pragma once
|
|
|
|
#define LUACPP_RUNTIME_INCLUDE_DIR "@LUACPP_RUNTIME_INCLUDE_DIR@"
|
|
#define LUACPP_LUA_CFLAGS "@LUACPP_LUA_CFLAGS@"
|
|
#define LUACPP_LUA_LIBS "@LUACPP_LUA_LIBS@"
|
|
#define LUACPP_GUI_FLAGS "@LUACPP_GUI_FLAGS@"
|