Our great sponsors
-
LearnOpenGL
Code repository of all OpenGL chapters from the book and its accompanying website https://learnopengl.com
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Raylib is a simple library that was build with educating in mind, so it should be fine as a starting point. There are a few zig bindings and projects for it on Github.
But as u/Trainrider said, if you want to learn graphics programming from scratch, you probably should learn OpenGL at some point.
The repo is here https://github.com/PiergiorgioZagaria/Chip8-emulator-zig/blob/main/src/sdl/app.zig.
I was faced with this problem when I started writing a ray tracer. After some deliberation, I realized that for my purposes, I didn't need to put pixels directly on the screen, I just needed to put them somewhere. So I wrote a dirt-simple TGA file writing function (70 lines of Zig, no external libraries) and let any image viewing application do the drawing to the screen. https://github.com/ratfactor/tga.zig