SDL3 (aka Simple DirectMedia Layer 3) is the latest major version (released January 2025 as v3.2.0) of the open-source, cross-platform multimedia development library SDL—succeeding SDL 2—and is designed for building games, emulators, multimedia apps, and more.
What’s new in SDL3?
Here are the key improvements introduced in SDL3:
- Modern GPU API: Simplified access to 3D rendering and GPU compute across platforms
- Dialog & Filesystem APIs: Native system file dialogs and directory management, plus built-in globbing
- Storage API: Abstract interface for platform-specific storage paths—ideal for game data, settings, etc.
- Camera & Pen Support: Built-in support for webcams and drawing tablets (e.g., Wacom, Apple Pencil)
- Audio Redesign: Includes logical devices, audio streams with resampling/pitch control, and automatic device migration
- Improved Input & High-DPI: Better keyboard handling, customizable virtual keyboards on mobile, and robust Hi-DPI support
- New Utility APIs: Properties (name/value dictionaries), process spawning, clipboard enhancements, app metadata, colorspace support, and more
Here you can find a collection of SDL3 tutorials ranging from beginning to expert level. SDL3 is nice, because it’s multiplatforms, and it can use DirectX or OpenGL, I tried to focus on original content you usually don’t found elsewhere. Most of my tutorial are code heavy, I tried to used an example to have something working at the end of the tutorial.
I will try to explain the new things in SDL3 compared to SDL2, what possible and what not.
Introduction and Setup
- SDL3 vs SDL2: key differences and features
- How to install SDL3 on Windows with Visual Studio and CMake
- How to install SDL3 with CMake on macOS
- How to install SDL3 on Linux with CMake
- How to build static SDL3, SDL3_image, and SDL3_ttf on Windows
Input Handling
- How to handle keyboard and mouse events with SDL3
- How to use gamepads and joysticks with SDL3
- How to draw with a graphic tablet using SDL3
Rendering
Basic Rendering
- How to display an image with SDL3
- How to display Unicode texts with SDL3_ttf
- How to make a health bar with SDL3 and SDL3_image
- How to animate sprites with Sprite Sheets and Frame Timing in SDL3
- How to implement a basic state machine using SDL3
- How to Create a 2D Camera System in SDL3
- How to Display and Manage Multiple Windows with SDL3
Advanced Rendering
- How to create 2D lighting with SDL3 using visibility polygons
- Use OpenGL shaders with SDL3 – Blur shader tutorial
- Procedural terrain generation with Perlin noise in SDL3
SDL3_gpu API
- Getting started with SDL3_gpu
- How to Display a triangle with SDL3_gpu
- How to Display a texture with SDL3_gpu
- Sprite batching with SDL3_gpu for efficient rendering
- How to display a tilemap from Tiled using SDL3
3D with OpenGL
2D Physics
- Implementing AABB Collision Detection in SDL3
- Implementing SAT Collision Detection in SDL3
- Implementing GJK Collision Detection in SDL3