Skip to content

Instantly share code, notes, and snippets.

@superzazu
superzazu / sdl2_pixelbuffer.c
Last active February 25, 2025 08:41
Displaying an array of pixels onto the screen in C99 with the SDL2
#include <stdio.h>
#include <stdbool.h>
#include <SDL.h>
#define WIN_WIDTH 160
#define WIN_HEIGHT 144
int main(int argc, char **argv) {
// SDL init