📕 subnode [[@jakeisnt/2023 05 18]] in 📚 node [[2023-05-18]]
  • Thursday, 05/18/2023 ** 19:39 Radicalized by GPUs - and needing something to do - I'm going to make interpretable graphics from scratch.

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,

📖 stoas
⥱ context