Sam Lantinga created the library, first releasing it in early 1998, while working for Loki Software. He got the idea while porting a Windows application to Macintosh. He then used SDL to port Doom to BeOS (see Doom source ports).11 Around the time of its creation, SDL was regarded as a simple alternative to DirectX.12 Several other free libraries were developed to work alongside SDL, such as SMPEG and OpenAL[clarify]. He also founded Galaxy Gameworks in 2008 to help commercially support SDL, although the company plans are currently on hold due to time constraints.13
Soon after putting Galaxy Gameworks on hold, Lantinga announced that SDL 1.3 (which would then later become SDL 2.0) would be licensed under the zlib License.14 Lantinga announced SDL 2.0 on 14 July 2012, at the same time announcing that he was joining Valve, the first version of which was announced the same day he joined the company.15 Lantinga announced the stable release of SDL 2.0.0 on 13 August 2013.16
SDL 2.0 is a major update to the SDL 1.2 codebase with a different, not backwards-compatible17 API. It replaces several parts of the 1.2 API with more general support for multiple input and output options. Some feature additions include multiple window support, hardware-accelerated 2D graphics, and better Unicode support.18
Support for Mir and Wayland was added in SDL 2.0.219 and enabled by default in SDL 2.0.4.20 Version 2.0.4 also provided better support for Android.21
In 2024, the stable preview of SDL 3.1.3 was released (and in January 2025 3.2.0 was released as stable). It makes the API more consistent and allows access to more parts of the device, along with other features.22
SDL is a wrapper around the operating-system-specific functions that the game needs to access. The only purpose of SDL is to provide a common framework for accessing these functions for multiple operating systems (cross-platform).23 SDL provides support for 2D pixel operations, sound, file access, event handling, timing and threading. It is often used to complement OpenGL by setting up the graphical output and providing mouse and keyboard input, since OpenGL comprises only rendering.
A game using the Simple DirectMedia Layer will not automatically run on every operating system; further adaptations must be applied. These are reduced to a minimum, since SDL also contains a few abstraction APIs for frequent functions offered by an operating system.
The syntax of SDL is function-based: all operations done in SDL are done by passing parameters to subroutines (functions). Special structures are also used to store the specific information SDL needs to handle. SDL functions are categorized under several different subsystems.
SDL is divided into several subsystems:24
Besides this basic, low-level support, there also are a few separate official libraries that provide some more functions. These comprise the "standard library", and are provided on the official website and included in the official documentation:
Other, non-standard libraries also exist. For example: SDL_Collide on SourceForge created by Amir Taaki.
The SDL 2.0 library has language bindings for:
Because of the way SDL is designed, much of its source code is split into separate modules for each operating system, to make calls to the underlying system. When SDL is compiled, the appropriate modules are selected for the target system. The following back-ends are available:55
An unofficial Sixel back-end is available for SDL 1.2.63
The Rockbox MP3 player firmware also distributes a version of SDL 1.2, which is used to run games such as Quake.64
Over the years SDL was used for many commercial and non-commercial video game projects. For instance, MobyGames listed 120 games using SDL in 2013,65 and the SDL website itself listed around 700 games in 2012.66 Important commercial examples are Angry Birds,67 Unreal Tournament, and games developed using Valve's Source Engine, which uses SDL extensively for cross-platform compatibility; ones from the open-source domain are OpenTTD,68 The Battle for Wesnoth69 or Freeciv.70
The cross-platform game releases of the popular Humble Indie Bundles for Linux, Mac and Android are often SDL-based.
SDL is also often used for later ports on new platforms with legacy code. For instance, the PC game Homeworld was ported to the Pandora handheld71 and Jagged Alliance 2 for Android72 via SDL.
Also, several non video game programs use SDL; examples are the emulators, such as DOSBox, FUSE ZX Spectrum emulator and VisualBoyAdvance.
There were several books written for development with SDL (see further reading).
SDL is used in university courses teaching multimedia and computer science, for instance, in a workshop about game programming using libSDL at the University of Cadiz in 2010, or a Game Design discipline at UTFPR (Ponta Grossa campus) in 2015.
"a list of the platforms SDL supports". Libsdl.org. Archived from the original on 1 April 2016. Retrieved 9 April 2016. https://web.archive.org/web/20160401091424/http://wiki.libsdl.org/Installation ↩
"SDL official website". Libsdl.org. Retrieved 19 March 2010. https://www.libsdl.org ↩
"CategoryVulkan - SDL Wiki'". wiki.libsdl.org. Retrieved 9 February 2025. https://wiki.libsdl.org/CategoryVulkan ↩
"SDL Language Bindings". libsdl.org. Simple DirectMedia Layer. Retrieved 13 August 2014. https://www.libsdl.org/languages.php ↩
"SDL license". Retrieved 3 March 2014. https://www.libsdl.org/license.php ↩
"Licensing the Simple DirectMedia Layer library". Retrieved 30 January 2012. https://www.libsdl.org/license.php ↩
"SDL/docs/README-dynapi.md at main · libsdl-org/SDL". GitHub. Retrieved 25 June 2024. https://github.com/libsdl-org/SDL/blob/main/docs/README-dynapi.md ↩
libsdl-org/sdl12-compat, Simple Directmedia Layer, 1 June 2024, retrieved 25 June 2024 https://github.com/libsdl-org/sdl12-compat ↩
"Simple DirectMedia Layer". 29 June 2010. Archived from the original on 29 June 2010. Retrieved 7 August 2021. https://web.archive.org/web/20100629004347/http://www.libsdl.org/games.php?order=name&category=-1&completed=0&os=-1&match_name=&perpage=-1 ↩
"SDL3/README/main-functions". wiki.libsdl.org. Retrieved 9 February 2025. https://wiki.libsdl.org/SDL3/README/main-functions#the-main-entry-point-in-sdl3 ↩
Lantinga, Sam (1 September 1999). "SDL: Making Linux fun". IBM. Archived from the original on 11 May 2003. Retrieved 15 December 2023. /wiki/Sam_Lantinga ↩
"Articles relating to SDL". Simple DirectMedia Layer. Archived from the original on 9 October 2003. Retrieved 22 January 2025. Search with the keywords "alternative", "simple" or "DirectX" in the page. https://web.archive.org/web/20031009043921/http://www.libsdl.org/articles.php ↩
"Exploring the Galaxy". 6 April 2011. Retrieved 30 January 2012. http://slouken.blogspot.com/2011/04/exploring-galaxy.html ↩
SDL 1.3 to be zLib Licensed, SDL Mailing List, 7 April 2011 http://forums.libsdl.org/viewtopic.php?t=7148 ↩
"SDL 2.0 Is Coming Very Soon With New Features". Retrieved 17 August 2012. https://www.phoronix.com/scan.php?page=news_item&px=MTE0MDU ↩
Announcing SDL 2.0.0, SDL Mailing List, 13 August 2013 http://forums.libsdl.org/viewtopic.php?p=38569&sid=9efbea827cdebd71ee430cda823bcdc7#38569 ↩
MigrationGuide - SDL Wiki'. Wiki.libsdl.org (21 November 2013). Retrieved on 2013-12-08. https://wiki.libsdl.org/moin.cgi/MigrationGuide#Backward-compatibility ↩
"SDL 1.3 Roadmap". 14 June 2011. Retrieved 25 July 2011. https://wiki.libsdl.org/moin.cgi/Roadmap ↩
Sneddon, Joey-Elijah (5 February 2014). "Some of Linux's Most Popular Games Will Run Natively On Mir". Retrieved 19 March 2014. http://www.omgubuntu.co.uk/2014/02/mir-sdl-support ↩
Lantinga, Sam (2 January 2016). "SDL 2.0.4 Changelog". Archived from the original on 4 March 2016. Retrieved 6 January 2016. https://web.archive.org/web/20160304094856/https://hg.libsdl.org/SDL/file/release-2.0.4/WhatsNew.txt#l65 ↩
"SDL_SysWMinfo". https://wiki.libsdl.org/SDL_SysWMinfo ↩
"SDL 3.1.3 Stable ABI Preview Release". Phoronix. Retrieved 13 November 2024. https://www.phoronix.com/news/SDL-3.1.3-Released ↩
"Introduction to SDL". Retrieved 3 March 2014. https://wiki.libsdl.org/Introduction ↩
"APIByCategory". https://wiki.libsdl.org/APIByCategory ↩
"SDL_image 2.0". libsdl.org. Retrieved 19 July 2014. https://www.libsdl.org/projects/SDL_image/ ↩
"SDL_mixer 2.0". libsdl.org. Retrieved 19 July 2014. https://www.libsdl.org/projects/SDL_mixer/ ↩
"SDL_net 2.0". libsdl.org. Retrieved 19 July 2014. https://www.libsdl.org/projects/SDL_net/ ↩
"SDL_ttf 2.0". libsdl.org. Retrieved 19 July 2014. https://www.libsdl.org/projects/SDL_ttf/ ↩
"SDL_rtf 0.1". libsdl.org. Retrieved 19 July 2014. https://www.libsdl.org/projects/SDL_rtf/ ↩
"cl-sdl2". GitHub. Retrieved 23 November 2017. https://github.com/lispgames/cl-sdl2 ↩
"f03sdl2". GitHub. Retrieved 28 October 2019. https://github.com/interkosmos/f03sdl2 ↩
"gb.sdl2". Gambas Wiki. Retrieved 2 February 2023. https://gambaswiki.org/wiki/comp/gb.sdl2 ↩
"SDL on Hackage". https://hackage.haskell.org/package/SDL ↩
"SDL2 on Hackage". https://hackage.haskell.org/package/sdl2 ↩
Bieler, Jonathan (30 July 2020). "jonathanBieler/SimpleDirectMediaLayer.jl". GitHub. Retrieved 8 August 2020. https://github.com/jonathanBieler/SimpleDirectMediaLayer.jl ↩
SquidSinker (2 August 2020). "Example games for GameZero.jl". GitHub. Retrieved 8 August 2020. https://github.com/SquidSinker/GZExamples ↩
Daly, Nathan (31 July 2019). "Example game written in julia using SDL2". GitHub. Retrieved 2 August 2019. https://github.com/NHDaly/PaddleBattle.jl ↩
"SDL2 for Nim". GitHub. Retrieved 31 May 2022. https://github.com/nim-lang/sdl2 ↩
"Odin Vendor Library Collection". https://pkg.odin-lang.org/vendor/sdl2/ ↩
"Odin GitHub repository". GitHub. https://github.com/odin-lang/Odin/tree/master/vendor#sdl2 ↩
"PerlGameDev/SDL". GitHub. Retrieved 20 February 2019. https://github.com/PerlGameDev/SDL ↩
"PHP-SDL". GitHub. Retrieved 28 October 2019. https://github.com/Ponup/php-sdl ↩
"SDL2::Raw". modules.raku.org. Retrieved 15 May 2020. https://modules.raku.org/dist/SDL2::Raw:cpan:TIMOTIMO) ↩
Beginning Ring Programming - From Novice to Professional | Mansour Ayouni | Apress. https://www.apress.com/gp/book/9781484258323 ↩
"Using RingLibSDL — Ring 1.16 documentation". https://ring-lang.github.io/doc1.16/libsdl.html ↩
"WhatsNew.txt". Archived from the original on 11 November 2020. Retrieved 28 September 2020. https://web.archive.org/web/20201111232012/https://www.libsdl.org/tmp/SDL/WhatsNew.txt ↩
"[Commits] SDL: Enable building the Metal renderer by default, and weak lin..." 7 December 2017.[permanent dead link] http://lists.libsdl.org/pipermail/commits-libsdl.org/2017-December/002441.html ↩
"SDL: README-platforms.txt@3e2f230a6d62". Hg.libsdl.org. libsdl.org. Archived from the original on 15 December 2013. Retrieved 8 December 2013. https://web.archive.org/web/20131215031050/http://hg.libsdl.org/SDL/file/default/README-platforms.txt ↩
"Using OpenGL With SDL". Retrieved 9 July 2015. https://www.libsdl.org/release/SDL-1.2.15/docs/html/guidevideoopengl.html ↩
"SDL and Wayland". https://wiki.archlinux.org/index.php/Wayland#SDL ↩
Larabel, Michael (30 September 2013). "Raspberry Pi Support Added To SDL2 Library". https://www.phoronix.com/scan.php?page=news_item&px=MTQ3MzA ↩
"SDL 1.2 Sixel". GitHub. Retrieved 9 April 2016. https://github.com/saitoha/libsixel/tree/v1.6.1#sdl-integration-gaming-virtualization-etc ↩
"SDLPluginPort". Retrieved 11 August 2019. https://www.rockbox.org/wiki/SdlPluginPort ↩
"Middleware: SDL Group Description". MobyGames. 27 September 2013. Archived from the original on 8 February 2013. Retrieved 18 May 2012. Games that use the very portable Simple DirectMedia Layer. https://archive.today/20130208120319/http://www.mobygames.com/game-group/middleware-sdl/ ↩
"Games". libsdl.org. 18 May 2012. Archived from the original on 29 June 2010. Retrieved 18 May 2012. https://web.archive.org/web/20100629004347/http://www.libsdl.org/games.php?order=name&category=-1&completed=0&os=-1&match_name=&perpage=-1 ↩
"SDL Testimonials". Galaxygameworks.com. Archived from the original on 16 July 2011. Retrieved 1 February 2012. https://web.archive.org/web/20110716163841/http://www.galaxygameworks.com/testimonials.html ↩
"Development". OpenTTD. Archived from the original on 10 July 2014. Retrieved 19 March 2010. https://web.archive.org/web/20140710225239/http://www.openttd.org/en/development ↩
"CompilingWesnoth". Wesnoth. 27 February 2010. Archived from the original on 6 April 2009. Retrieved 19 March 2010. https://web.archive.org/web/20090406100401/http://www.wesnoth.org/wiki/CompilingWesnoth#Prerequisites ↩
"SDLClient - Freeciv.org". Freeciv.wikia.com. Retrieved 19 March 2010. http://freeciv.wikia.com/wiki/SDLClient ↩
may88 (23 June 2011). "Game of the Week #3 – Homeworld SDL". pandorapress.net. Retrieved 8 May 2012. [...] released port of HomeworldSDL. Forum member Edglex enables your Pandora to experience the excellent work done by the guys at HomeworldSDL. https://pandorapress.net/2011/06/23/game-of-the-week-3-homeworld-sdl/ ↩
JA2 Stracciatella Feedback » Jagged Alliance 2 Android Stracciatella Port RC2 Release - please test Archived 23 October 2012 at the Wayback Machine on the Bear's Pit Forum, 3 October 2011 https://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=273148&page=1 ↩