Skip to content

Instantly share code, notes, and snippets.

View TheMrPoseidon's full-sized avatar

TheMrPoseidon

  • DATEV eG
  • Nürnberg, BY, Germany
  • 10:58 (UTC +01:00)
View GitHub Profile
@fschr
fschr / main.cpp
Last active September 30, 2025 19:32
SDL2 Hello World | SDL2 Getting Started | SDL | OpenGL
// SDL2 Hello, World!
// This should display a white screen for 2 seconds
// compile with: clang++ main.cpp -o hello_sdl2 -lSDL2
// run with: ./hello_sdl2
#include <SDL2/SDL.h>
#include <stdio.h>
#define SCREEN_WIDTH 640
#define SCREEN_HEIGHT 480