Skip to content

Instantly share code, notes, and snippets.

View FernandoAiresCastello's full-sized avatar
:octocat:

Fernando Aires Castello FernandoAiresCastello

:octocat:
  • Florianópolis, SC / Brazil
View GitHub Profile
@FernandoAiresCastello
FernandoAiresCastello / sdl2_pixel_drawing.c
Last active April 24, 2024 22:08
Functions to dynamically draw individual pixels in C using SDL2. Is this the fastest way? Is this the simplest way? Is it the most elegant way? You'll be the judge.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <SDL.h>
typedef int rgb;
#define SCR_W 360
#define SCR_H 200