Weβre starting with SDL2.
Why?
We need a library to manage window manager events to write code that runs on multiple platforms. Our two options here are GLFW and SDL2. (Other options are immature. Rolling our own is a waste of time and impossible to keep up with.)
For simplicityβs sake, we also want to be able to access the framebuffer and all of its information. GLFW makes the assumption that you will be passing its framebuffer directly to a supplementary graphics library for you that will query information such as window dimensions. GPU drivers and APIs are a proprietary mess, so we will not be using them. SDL2 gives us all of the information we need about the window we open. Hell yeah!
Later, we might want to underpin the interfaces that are developed for software rendering with GPU code for performance. This will not happen unless there is a significant performance bottleneck. For now, weβll use SDL2βs framebuffer to handle everything. ** 21:16 Iβve been waffling around minimal computing for awhile now - and now Iβve got it. Largely inspired by ideas from 100 rabbits - https://100r.co/site/uxn.html - but considering that their approach butts heads with everything I know about programming language and user interface design, I couldnβt entirely buy in. I wanted to learn more first.
Weβre starting with a simple Zig experiment - render an 8x8 grid of pixels with a moving animation. From here, weβll explore fonts,
Rendering context...