I’m writing a small graphics library for a game I’m going to program in zig. I would like to know if there is any zig library that allows you to draw pixels directly to a frame buffer, sort of like the minifb or pixels library for Rust?
Alternatively, if there is a stable C library for this I’m open to using this too - although I still haven’t fully wrapped my head around zig’s crazy build system so might need some help setting it up!
Yes, for me wayland / linux is fine, although I may port to another library later for windows/macos support if I find a library that can do that (or write my own). This looks great for now!
For a pixel framebuffer you would copy the pixels from a CPU memory region into a texture and render that texture via the 3D API (I’m actually pondering wrapping exactly this functionality in a new sokol library, but don’t hold your breath)
Your library looks great! I think for now, I’m going to use the C library of minifb as it has worked quite well for me in the past. When I upgrade my library though, I’ll definitely consider using sokol!