Modern C++23 graphics/multimedia framework on top of SDL3.
Windowing, events, 2D/3D rendering, timing. Opinionated API, low boilerplate.
-
C++23 compiler (clang/gcc)
-
CMake + Ninja (used only to build vendored code)
-
thats all!
./build.sh dev # debug
./build.sh # releaseSDL3 is compiled from vendor/SDL3 into a static library and linked into libvexa.so. You do not need a system SDL3 package.
Minimal example
#include <vexa/vexa.hpp>
using namespace vexa;
int main()
{
// Initialize Vexa
initCores(Core::VIDEO);
// create a window with 1280x720 size and default renderer
auto window = Window{}
.setSize({1280, 720})
.setRenderer({})
.create();
auto& gfx = window.renderer();
bool running = true;
while (running)
{
while (auto event = Event::Poll()) {
switch (event->type()) {
case Event::QUIT: { running = false; break; }
default: {}
}
}
gfx.start(Color::BLACK);
gfx.rectFill(Rect{480, 200, 320, 320}, Color::CYAN);
gfx.finish();
time::sleep(time::Millis(16.67));
}
}- clone this repo
- find
examples.luafile - add your own example name to the
exampleslist - go to
examples/directory and copy-paste_example_template_.cpp - change file name to
<name-added-to-list>.cpp - fill example header, code an example
note: If you want to publish, fork the repo and do the same steps then make a PR, i will accept it!
include/vexa/public headerssrc/sources filesvendor/vendored codescripts/xmake related scripts
See License.
If you use this project, a mention or credit would be greatly appreciated (but is not required beyond the license terms).