/sdl2-starter

Ready-to-go SDL2 boilerplate

Primary LanguageC++MIT LicenseMIT

sdl2-starter

A simple C++ starter for cross-platform SDL2 projects. Comes with a basic RAII window for streaming RGB24 images from the CPU.

Screenshot of hello world

brew install sdl2
make
./app

Refer to this blog post for setting up a windows build. For a Linux build, install SDL2 through your package manager and refer to the comments in the Makefile for changing the linker instructions.

For info on why Image works, see Images and Rendering and to learn what texture streaming is see Graphics and Texture Streaming.

I've used this starter for my emulation projects, and also for personal graphics research. If you're reading Computer Graphics from Scratch this is one of the easier ways to get a PutPixel function up and running.