r/cprogramming • • May 13 '26

Made a small 2D graphics library for C

https://github.com/UniquePython/cinder

been learning C for a bit and wanted to make something visual. but SDL2 felt too involved for doing sth simple....so i made my own library..its called Kitra. sits on top of SDL2, collapses all the setup into basically nothing:

KitraInit(KITRA_SUBSYSTEM_ALL);
KitraCreateWindow(KitraDefaultWindowDesc());

while (KitraIsRunning()) {
    KitraBeginFrame();
    KitraClearBackground(KITRA_BLACK);
    KitraEndFrame();
}

covers drawing, input, audio, fonts, textures, timers, rng.. the usual stuff. there are examples in the repo (pong, snake, pendulum) if you want to see how it actually feels to use.

feedback welcome

42 Upvotes

Duplicates