Posts

Showing posts from May, 2026

Part 1 - Setting Up SDL and Color Buffer

Image
Overview of Progress  I spent today setting up the project with SDL, setting up the color buffer to map to the pixels on our display, and getting a rectangle drawing on the screen. Project Setup Language and Technologies I'll be programming this software renderer using C and SDL2. I'm using C to force myself to learn what's happening under the hood and implement functionality myself, and SDL2 to avoid having to write cross-platform functionality so that I can focus on the graphics programming concepts. Details Of Progress I started with a main function that initializes the window, calls setup, and handles a naive game loop. The game loop currently handles three things: processing input, updating, and rendering. Initializing The Window SDL provides a lot of the logic needed for this step, so I just called the relevant methods and made sure to return errors if anything fails. One thing to note is a bug where if you tell SDL to run in full-screen mode, you can't click on a...