Simple DirectMedia Layer: cross-platform C library for windows, input, audio and graphics
open sourceZlibfree
SDL (Simple DirectMedia Layer) is a cross-platform development library written in C that gives low-level access to audio, keyboard, mouse, joystick and graphics hardware via OpenGL and Direct3D. It officially supports Windows, macOS, Linux, iOS and Android, works natively with C++, and has bindings for several other languages, including C# and Python. Video playback software, emulators and many games are built on it, including Valve's catalog. It is distributed under the zlib license, so it can be used freely in any software.
Problems it solves
- I'm writing a game in C or C++ and need one API for windows, input and sound on Windows, macOS and Linux
- I need gamepad and joystick input that works the same across platforms
- We're porting an emulator and want a thin layer over the OS for video, audio and controllers
Features
- Window creation and graphics access via OpenGL and Direct3D
- Keyboard, mouse and joystick input
- Cross-platform audio
- Official support for Windows, macOS, Linux, iOS and Android
- Bindings for other languages, including C# and Python
- sdl2-compat, a binary- and source-compatible SDL2 layer that runs existing SDL2 programs on SDL3
Alternatives
The same job
These do what SDL does.
