Simple DirectMedia Layer: Difference between revisions

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
imported>InternetArchiveBot
Rescuing 3 sources and tagging 1 as dead.) #IABot (v2.0.9.5
imported>Bumm13
m formatting fixes
 
Line 16: Line 16:
Fixed byte order detection on Solaris
Fixed byte order detection on Solaris
-->
-->
| operating system = Version 3 supports same (current) platforms <!-- and still Haiku and RISC OS listed for SDL 3, rightly or wrongly, but e.g. Amiga is absent, and Google Stadia and Nokia N-Gage are dropped. --> as {{nowrap|version 2}}, such as 32- and 64-bit Windows 10+<!-- has Win10 specific code, for e.g. Direct3D. Unclear if older is still support, then with less functionality, at least I still see in SDL3 source code (even SDL_PLATFORM_HAIKU, supposedly dropped, and SDL_PLATFORM_AIX, not bitrotted?) additionally:
| operating system = Version 3 supports same (current) platforms <!-- and still Haiku and RISC OS listed for SDL 3, rightly or wrongly, but e.g. Amiga is absent, and Google Stadia and Nokia N-Gage are dropped. --> as {{nowrap|version 2}}, such as 32- and 64-bit Windows XP+<!-- has Win10 specific code, for e.g. Direct3D. The linked docs for SDL3 state clearly that XP is the minimum supported version for windows, "All desktop Windows versions, back to Windows XP, are still supported."
        /* Windows 2000/XP and later, deprecated as of Windows 10 (still
          available), available in Wine (tested 6.0.3) */
        result = SHGetFolderPathW(NULL, type, NULL, SHGFP_TYPE_CURRENT, path);


I also see requirements upped to Android 15 SDK 35 in SDL 3, from 34, though I still see in source code Android 11 (may stil be supported?):
I also see requirements upped to Android 15 SDK 35 in SDL 3, from 34, though I still see in source code Android 11 (may stil be supported?):
Line 36: Line 33:
}}
}}


'''Simple DirectMedia Layer''' ('''SDL''') is a [[cross-platform]] [[software development]] [[library (computing)|library]] designed to provide a [[hardware abstraction layer]] for computer [[multimedia]] [[computer hardware|hardware components]]. Software developers can use it to write high-performance [[personal computer game|computer games]] and other multimedia applications that can run on many [[operating system]]s such as [[AmigaOS]], [[Android (operating system)|Android]]<!-- surprisingly even with a joystick, also on iOS, see in code: SDL_JOYSTICK_ANDROID SDL_JOYSTICK_IOS_H -->, [[iOS]], [[Linux]], [[MorphOS]], [[macOS]], and [[Microsoft Windows|Windows]].<ref name="platforms">{{cite web|url=https://wiki.libsdl.org/Installation |title=a list of the platforms SDL supports |publisher=Libsdl.org |access-date=9 April 2016 |archive-url=https://web.archive.org/web/20160401091424/http://wiki.libsdl.org/Installation |archive-date=2016-04-01}}</ref>
'''Simple DirectMedia Layer''' ('''SDL''') is a [[cross-platform]] [[software development]] [[library (computing)|library]] designed to provide a [[hardware abstraction layer]] for computer [[multimedia]] [[computer hardware|hardware components]]. Software developers can use it to write high-performance [[PC game|computer games]] and other multimedia applications that can run on many [[operating system]]s such as [[AmigaOS]], [[Android (operating system)|Android]]<!-- surprisingly even with a joystick, also on iOS, see in code: SDL_JOYSTICK_ANDROID SDL_JOYSTICK_IOS_H -->, [[iOS]], [[Linux]], [[MorphOS]], [[macOS]], and [[Microsoft Windows|Windows]].<ref name="platforms">{{cite web|url=https://wiki.libsdl.org/Installation |title=a list of the platforms SDL supports |publisher=Libsdl.org |access-date=9 April 2016 |archive-url=https://web.archive.org/web/20160401091424/http://wiki.libsdl.org/Installation |archive-date=2016-04-01}}</ref>


SDL manages [[video display|video]], [[computer speakers|audio]], [[input device]]s, [[thread (computing)|threads]], [[shared object]] loading, [[computer networking|networking]] and timers.<ref>{{cite web|url=https://www.libsdl.org |title=SDL official website |publisher=Libsdl.org |access-date=19 March 2010}}</ref> For 3D graphics, it can handle an [[OpenGL]], [[Vulkan]],<ref name="vulkan">{{Cite web|url=https://wiki.libsdl.org/CategoryVulkan|title=CategoryVulkan - SDL Wiki'|website=wiki.libsdl.org|access-date=2025-02-09}}</ref> [[Metal (API)|Metal]], or [[Direct3D#Direct3D 11|Direct3D11]] (older Direct3D version 9 is also supported) context. A common misconception is that SDL is a [[game engine]]<!-- contradicted in main text (I meant to comment out since I was even unsure by now).  https://github.com/libsdl-org/SDL/blob/main/docs/README-main-functions.md explains how function main is substituted (e.g. for WinMain reasons), and it seems to describe framework behavior, but doesn't use that term and even if it does, then it seems optional to do so. At least it does provide callback behavior, that and an event loop seems always needed in games: or a [[software framework]] (Apple [[.framework]] bundle is though supported)-->. However, the library is suited to building games directly, or is usable indirectly by engines built on top of it.
SDL manages [[Electronic visual display|video]], [[computer speakers|audio]], [[input device]]s, [[thread (computing)|threads]], [[shared library|shared object]] loading, [[computer network]]ing and timers.<ref>{{cite web|url=https://www.libsdl.org |title=SDL official website |publisher=Libsdl.org |access-date=19 March 2010}}</ref> For 3D graphics, it can handle an [[OpenGL]], [[Vulkan]],<ref name="vulkan">{{Cite web|url=https://wiki.libsdl.org/CategoryVulkan|title=CategoryVulkan - SDL Wiki'|website=wiki.libsdl.org|access-date=2025-02-09}}</ref> [[Metal (API)|Metal]], or [[Direct3D#Direct3D 11|Direct3D11]] (older Direct3D version 9 is also supported) context. A common misconception is that SDL is a [[game engine]]<!-- contradicted in main text (I meant to comment out since I was even unsure by now).  https://github.com/libsdl-org/SDL/blob/main/docs/README-main-functions.md explains how function main is substituted (e.g. for WinMain reasons), and it seems to describe framework behavior, but doesn't use that term and even if it does, then it seems optional to do so. At least it does provide callback behavior, that and an event loop seems always needed in games: or a [[software framework]] (Apple [[.framework]] bundle is though supported)-->. However, the library is suited to building games directly, or is usable indirectly by engines built on top of it.


The library is internally written in [[C (programming language)|C]] and possibly, depending on the target platform, [[C++]] or [[Objective-C]], and provides the [[application programming interface]] in C, with bindings to other languages available.<ref name="sdl2bindings">{{cite web |url=https://www.libsdl.org/languages.php |title=SDL Language Bindings |website=libsdl.org |publisher=Simple DirectMedia Layer |access-date=13 August 2014}}</ref> It is [[free and open-source software]] subject to the requirements of the [[zlib License]] since version 2.0, and with prior versions subject to the [[GNU Lesser General Public License]].<ref name="license" /> Under the zlib License, SDL 2.0 is freely available for [[static linking]] in [[closed-source]] projects, unlike SDL 1.2,<ref>{{cite web |title=Licensing the Simple DirectMedia Layer library |url=https://www.libsdl.org/license.php |access-date=30 January 2012}}</ref> although it is possible for the user to override the statically linked library with one provided by them.<ref>{{Cite web |title=SDL/docs/README-dynapi.md at main · libsdl-org/SDL |url=https://github.com/libsdl-org/SDL/blob/main/docs/README-dynapi.md |access-date=2024-06-25 |website=GitHub |language=en}}</ref> SDL 2.0, released in 2013, was a major departure from previous versions, offering more opportunity for 3D hardware acceleration, but breaking backwards-compatibility; a wrapper library made to translate 1.2 calls to 2.0 was later made available.<ref>{{Citation |title=libsdl-org/sdl12-compat |date=2024-06-01 |url=https://github.com/libsdl-org/sdl12-compat |access-date=2024-06-25 |publisher=Simple Directmedia Layer}}</ref>
The library is internally written in [[C (programming language)|C]] and possibly, depending on the target platform, [[C++]] or [[Objective-C]], and provides the [[application programming interface]] in C, with bindings to other languages available.<ref name="sdl2bindings">{{cite web |url=https://www.libsdl.org/languages.php |title=SDL Language Bindings |website=libsdl.org |publisher=Simple DirectMedia Layer |access-date=13 August 2014}}</ref> It is [[free and open-source software]] subject to the requirements of the [[zlib License]] since version 2.0, and with prior versions subject to the [[GNU Lesser General Public License]].<ref name="license" /> Under the zlib License, SDL 2.0 is freely available for [[static linking]] in [[closed-source]] projects, unlike SDL 1.2,<ref>{{cite web |title=Licensing the Simple DirectMedia Layer library |url=https://www.libsdl.org/license.php |access-date=30 January 2012}}</ref> although it is possible for the user to override the statically linked library with one provided by them.<ref>{{Cite web |title=SDL/docs/README-dynapi.md at main · libsdl-org/SDL |url=https://github.com/libsdl-org/SDL/blob/main/docs/README-dynapi.md |access-date=2024-06-25 |website=GitHub |language=en}}</ref> SDL 2.0, released in 2013, was a major departure from previous versions, offering more opportunity for 3D hardware acceleration, but breaking backwards-compatibility; a wrapper library made to translate 1.2 calls to 2.0 was later made available.<ref>{{Citation |title=libsdl-org/sdl12-compat |date=2024-06-01 |url=https://github.com/libsdl-org/sdl12-compat |access-date=2024-06-25 |publisher=Simple Directmedia Layer}}</ref>
Line 46: Line 43:
SDL supports [[Emscripten]] (i.e. programs that run on a web page).
SDL supports [[Emscripten]] (i.e. programs that run on a web page).


SDL 3 was released, as a stable version, in January 2025. It has a migration guide, and Coccinelle tool support to help migrate to the new major version. SDL 3 has a new way to control the entry point of your program,<ref>{{Cite web |title=SDL3/README/main-functions |url=https://wiki.libsdl.org/SDL3/README/main-functions#the-main-entry-point-in-sdl3 |access-date=2025-02-09 |website=wiki.libsdl.org}}</ref> and you can optionally control execution in a non-framework way.
SDL 3 was released, as a stable version, in January 2025. It has a migration guide, and [[Coccinelle (software)|Coccinelle]] tool support to help migrate to the new major version. SDL 3 has a new way to control the entry point of your program,<ref>{{Cite web |title=SDL3/README/main-functions |url=https://wiki.libsdl.org/SDL3/README-main-functions |access-date=2025-02-09 |website=wiki.libsdl.org}}</ref> and you can optionally control execution in a non-framework way.


== History ==
== History ==
Line 53: Line 50:
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]].<ref name=SDL1.3zLib>[http://forums.libsdl.org/viewtopic.php?t=7148 SDL 1.3 to be zLib Licensed], SDL Mailing List, 7 April 2011</ref> Lantinga announced SDL 2.0 on 14 July 2012, at the same time announcing that he was joining [[Valve Corporation|Valve]], the first version of which was announced the same day he joined the company.<ref>{{cite web | url=https://www.phoronix.com/scan.php?page=news_item&px=MTE0MDU | title=SDL 2.0 Is Coming Very Soon With New Features | access-date=17 August 2012}}</ref> Lantinga announced the stable release of SDL 2.0.0 on 13 August 2013.<ref name=Announcing-SDL2.0.0>[http://forums.libsdl.org/viewtopic.php?p=38569&sid=9efbea827cdebd71ee430cda823bcdc7#38569 Announcing SDL 2.0.0], SDL Mailing List, 13 August 2013</ref>
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]].<ref name=SDL1.3zLib>[http://forums.libsdl.org/viewtopic.php?t=7148 SDL 1.3 to be zLib Licensed], SDL Mailing List, 7 April 2011</ref> Lantinga announced SDL 2.0 on 14 July 2012, at the same time announcing that he was joining [[Valve Corporation|Valve]], the first version of which was announced the same day he joined the company.<ref>{{cite web | url=https://www.phoronix.com/scan.php?page=news_item&px=MTE0MDU | title=SDL 2.0 Is Coming Very Soon With New Features | access-date=17 August 2012}}</ref> Lantinga announced the stable release of SDL 2.0.0 on 13 August 2013.<ref name=Announcing-SDL2.0.0>[http://forums.libsdl.org/viewtopic.php?p=38569&sid=9efbea827cdebd71ee430cda823bcdc7#38569 Announcing SDL 2.0.0], SDL Mailing List, 13 August 2013</ref>


SDL 2.0 is a major update to the SDL 1.2 [[codebase]] with a different, not [[backward compatibility|backwards-compatible]]<ref>[https://wiki.libsdl.org/moin.cgi/MigrationGuide#Backward-compatibility MigrationGuide - SDL Wiki'] {{Webarchive|url=https://web.archive.org/web/20130127115533/http://wiki.libsdl.org/moin.cgi/MigrationGuide#Backward-compatibility |date=27 January 2013 }}. Wiki.libsdl.org (21 November 2013). Retrieved on 2013-12-08.</ref> [[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.<ref>{{cite web |url=https://wiki.libsdl.org/moin.cgi/Roadmap |title=SDL 1.3 Roadmap |date=14 June 2011 |access-date=25 July 2011 }}{{Dead link|date=June 2025 |bot=InternetArchiveBot |fix-attempted=yes }}</ref>
SDL 2.0 is a major update to the SDL 1.2 [[codebase]] with a different, not [[backward compatibility|backwards-compatible]]<ref>[https://wiki.libsdl.org/moin.cgi/MigrationGuide#Backward-compatibility MigrationGuide - SDL Wiki'] {{Webarchive|url=https://web.archive.org/web/20130127115533/http://wiki.libsdl.org/moin.cgi/MigrationGuide#Backward-compatibility |date=27 January 2013 }}. Wiki.libsdl.org (21 November 2013). Retrieved on 2013-12-08.</ref> [[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.<ref>{{cite web |url=https://wiki.libsdl.org/moin.cgi/Roadmap |title=SDL 1.3 Roadmap |date=14 June 2011 |access-date=25 July 2011 |archive-date=23 October 2011 |archive-url=https://web.archive.org/web/20111023232913/http://wiki.libsdl.org/moin.cgi/Roadmap |url-status=dead }}</ref>


Support for [[Mir (software)|Mir]] and [[Wayland (display server protocol)|Wayland]] was added in SDL 2.0.2<ref>{{cite web|url=http://www.omgubuntu.co.uk/2014/02/mir-sdl-support |title=Some of Linux's Most Popular Games Will Run Natively On Mir |first=Joey-Elijah |last=Sneddon |date=5 February 2014 |access-date=19 March 2014}}</ref> and enabled by default in SDL 2.0.4.<ref>{{cite web|url=https://hg.libsdl.org/SDL/file/release-2.0.4/WhatsNew.txt#l65|title=SDL 2.0.4 Changelog|first=Sam|last=Lantinga|date=2 January 2016|access-date=6 January 2016|archive-date=4 March 2016|archive-url=https://web.archive.org/web/20160304094856/https://hg.libsdl.org/SDL/file/release-2.0.4/WhatsNew.txt#l65|url-status=dead}}</ref> Version 2.0.4 also provided better support for Android.<ref>{{Cite web|url=https://wiki.libsdl.org/SDL_SysWMinfo|title=SDL_SysWMinfo|access-date=23 March 2015|archive-date=22 June 2015|archive-url=https://web.archive.org/web/20150622132907/https://wiki.libsdl.org/SDL_SysWMinfo|url-status=dead}}</ref>
Support for [[Mir (software)|Mir]] and [[Wayland (display server protocol)|Wayland]] was added in SDL 2.0.2<ref>{{cite web|url=http://www.omgubuntu.co.uk/2014/02/mir-sdl-support |title=Some of Linux's Most Popular Games Will Run Natively On Mir |first=Joey-Elijah |last=Sneddon |date=5 February 2014 |access-date=19 March 2014}}</ref> and enabled by default in SDL 2.0.4.<ref>{{cite web|url=https://hg.libsdl.org/SDL/file/release-2.0.4/WhatsNew.txt#l65|title=SDL 2.0.4 Changelog|first=Sam|last=Lantinga|date=2 January 2016|access-date=6 January 2016|archive-date=4 March 2016|archive-url=https://web.archive.org/web/20160304094856/https://hg.libsdl.org/SDL/file/release-2.0.4/WhatsNew.txt#l65|url-status=dead}}</ref> Version 2.0.4 also provided better support for Android.<ref>{{Cite web|url=https://wiki.libsdl.org/SDL_SysWMinfo|title=SDL_SysWMinfo|access-date=23 March 2015|archive-date=22 June 2015|archive-url=https://web.archive.org/web/20150622132907/https://wiki.libsdl.org/SDL_SysWMinfo|url-status=dead}}</ref>
Line 60: Line 57:


== Software architecture ==
== Software architecture ==
SDL is a [[wrapper library|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).<ref>{{cite web|url=https://wiki.libsdl.org/Introduction|title=Introduction to SDL|access-date=3 March 2014|archive-date=28 February 2014|archive-url=https://web.archive.org/web/20140228181922/http://wiki.libsdl.org/Introduction|url-status=dead}}</ref> 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.
SDL is a [[wrapper library|wrapper]] around the operating-system-specific functions that the program needs to access. The only purpose of SDL is to provide a common framework for accessing these functions for multiple operating systems (cross-platform).<ref>{{cite web|url=https://wiki.libsdl.org/Introduction|title=Introduction to SDL|access-date=3 March 2014|archive-date=28 February 2014|archive-url=https://web.archive.org/web/20140228181922/http://wiki.libsdl.org/Introduction|url-status=dead}}</ref> 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.
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.

Latest revision as of 10:40, 14 November 2025

Template:Short description Template:Use dmy dates Script error: No such module "Infobox".Template:Template otherScript error: No such module "Check for unknown parameters".Template:Main other

Simple DirectMedia Layer (SDL) is a cross-platform software development library designed to provide a hardware abstraction layer for computer multimedia hardware components. Software developers can use it to write high-performance computer games and other multimedia applications that can run on many operating systems such as AmigaOS, Android, iOS, Linux, MorphOS, macOS, and Windows.[1]

SDL manages video, audio, input devices, threads, shared object loading, computer networking and timers.[2] For 3D graphics, it can handle an OpenGL, Vulkan,[3] Metal, or Direct3D11 (older Direct3D version 9 is also supported) context. A common misconception is that SDL is a game engine. However, the library is suited to building games directly, or is usable indirectly by engines built on top of it.

The library is internally written in C and possibly, depending on the target platform, C++ or Objective-C, and provides the application programming interface in C, with bindings to other languages available.[4] It is free and open-source software subject to the requirements of the zlib License since version 2.0, and with prior versions subject to the GNU Lesser General Public License.[5] Under the zlib License, SDL 2.0 is freely available for static linking in closed-source projects, unlike SDL 1.2,[6] although it is possible for the user to override the statically linked library with one provided by them.[7] SDL 2.0, released in 2013, was a major departure from previous versions, offering more opportunity for 3D hardware acceleration, but breaking backwards-compatibility; a wrapper library made to translate 1.2 calls to 2.0 was later made available.[8]

SDL is extensively used in the industry in both large and small projects. By 2010, over 700 games, 180 applications, and 120 demos had been posted on the library website.[9]

SDL supports Emscripten (i.e. programs that run on a web page).

SDL 3 was released, as a stable version, in January 2025. It has a migration guide, and Coccinelle tool support to help migrate to the new major version. SDL 3 has a new way to control the entry point of your program,[10] and you can optionally control execution in a non-framework way.

History

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 Template:Clarification needed span. 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-compatible[17] 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.2[19] 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]

Software architecture

SDL is a wrapper around the operating-system-specific functions that the program 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.

Subsystems

SDL is divided into several subsystems:[24]

Basics
Initialization and Shutdown, Configuration Variables, Error Handling, Log Handling
Video
Display and Window Management, surface functions, rendering acceleration, etc.
Input Events
Event handling, Support for Keyboard, Mouse, Joystick and Game controller
Force Feedback
SDL_haptic.h implements support for "Force Feedback"
Audio
SDL_audio.h implements Audio Device Management, Playing and Recording
Threads
multi-threading: Thread Management, Thread Synchronization Primitives, Atomic Operations
Timers
Timer Support
File Abstraction
Filesystem Paths, File I/O Abstraction
Shared Object Support
Shared Object Loading and Function Lookup
Platform and CPU Information
Platform Detection, CPU Feature Detection, Byte Order and Byte Swapping, Bit Manipulation
Power Management
Power Management Status
Additional
Platform-specific functionality

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:

  • SDL_image — support for multiple image formats[25]
  • SDL_mixer — complex audio functions, mainly for sound mixing[26]
  • SDL_net — networking support[27]
  • SDL_ttfTrueType font rendering support[28]
  • SDL_rtf — simple Rich Text Format rendering[29]

Other, non-standard libraries also exist. For example: SDL_Collide on SourceForge created by Amir Taaki.

Language bindings

The SDL 2.0 library has language bindings for: Template:Div col

Template:Div col end

Supported back-ends

File:SDL Layers.svg
Abstraction layers of several SDL platforms

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:[1]

An unofficial Sixel back-end is available for SDL 1.2.[53]

The Rockbox MP3 player firmware also distributes a version of SDL 1.2, which is used to run games such as Quake.[54]

Reception and adoption

File:SDL-Workshop-IMG 2612.jpg
Workshop on SDL, University of Cádiz (2010)

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,[55] and the SDL website itself listed around 700 games in 2012.[56] Important commercial examples are Angry Birds,[57] 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,[58] The Battle for Wesnoth[59] or Freeciv.[60]

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 handheld[61] and Jagged Alliance 2 for Android[62] 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.

Video game examples using SDL

See also

Script error: No such module "Portal". Template:Div col

References

Template:Reflist

Further reading

External links

  1. a b Script error: No such module "citation/CS1".
  2. Script error: No such module "citation/CS1".
  3. a b Script error: No such module "citation/CS1".
  4. a b c d e f g h i j Script error: No such module "citation/CS1".
  5. Cite error: Invalid <ref> tag; no text was provided for refs named license
  6. Script error: No such module "citation/CS1".
  7. Script error: No such module "citation/CS1".
  8. Script error: No such module "citation/CS1".
  9. Script error: No such module "citation/CS1".
  10. Script error: No such module "citation/CS1".
  11. Script error: No such module "citation/CS1".
  12. Script error: No such module "citation/CS1". Search with the keywords "alternative", "simple" or "DirectX" in the page.
  13. Script error: No such module "citation/CS1".
  14. SDL 1.3 to be zLib Licensed, SDL Mailing List, 7 April 2011
  15. Script error: No such module "citation/CS1".
  16. Announcing SDL 2.0.0, SDL Mailing List, 13 August 2013
  17. MigrationGuide - SDL Wiki' Template:Webarchive. Wiki.libsdl.org (21 November 2013). Retrieved on 2013-12-08.
  18. Script error: No such module "citation/CS1".
  19. Script error: No such module "citation/CS1".
  20. Script error: No such module "citation/CS1".
  21. Script error: No such module "citation/CS1".
  22. Script error: No such module "citation/CS1".
  23. Script error: No such module "citation/CS1".
  24. Script error: No such module "citation/CS1".
  25. Script error: No such module "citation/CS1".
  26. Script error: No such module "citation/CS1".
  27. Script error: No such module "citation/CS1".
  28. Script error: No such module "citation/CS1".
  29. Script error: No such module "citation/CS1".
  30. Script error: No such module "citation/CS1".
  31. Script error: No such module "citation/CS1".
  32. Script error: No such module "citation/CS1".
  33. a b Script error: No such module "citation/CS1".
  34. Script error: No such module "citation/CS1".
  35. Script error: No such module "citation/CS1".
  36. Script error: No such module "citation/CS1".
  37. Script error: No such module "citation/CS1".
  38. Script error: No such module "citation/CS1".
  39. Script error: No such module "citation/CS1".
  40. Script error: No such module "citation/CS1".
  41. Script error: No such module "citation/CS1".
  42. Script error: No such module "citation/CS1".
  43. Script error: No such module "citation/CS1".
  44. Script error: No such module "citation/CS1".
  45. Script error: No such module "citation/CS1".
  46. Script error: No such module "citation/CS1".
  47. Script error: No such module "citation/CS1".
  48. Script error: No such module "citation/CS1".Template:Dead link
  49. Script error: No such module "citation/CS1".
  50. Script error: No such module "citation/CS1".
  51. Script error: No such module "citation/CS1".
  52. Script error: No such module "citation/CS1".
  53. Script error: No such module "citation/CS1".
  54. Script error: No such module "citation/CS1".
  55. Script error: No such module "citation/CS1".
  56. Script error: No such module "citation/CS1".
  57. Script error: No such module "citation/CS1".
  58. Script error: No such module "citation/CS1".
  59. Script error: No such module "citation/CS1".
  60. Script error: No such module "citation/CS1".
  61. Script error: No such module "citation/CS1".
  62. JA2 Stracciatella Feedback » Jagged Alliance 2 Android Stracciatella Port RC2 Release - please test Template:Webarchive on the Bear's Pit Forum, 3 October 2011
  63. Script error: No such module "citation/CS1".
  64. Script error: No such module "citation/CS1".
  65. Script error: No such module "citation/CS1".
  66. Script error: No such module "citation/CS1".
  67. Script error: No such module "citation/CS1".
  68. Script error: No such module "citation/CS1".
  69. Script error: No such module "citation/CS1".
  70. Script error: No such module "citation/CS1".
  71. Script error: No such module "citation/CS1".
  72. Script error: No such module "citation/CS1".