The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "Package:Simple DirectMedia Layer"
(SDL2) |
(Edit console commands) |
||
Line 25: | Line 25: | ||
* SDL2-TTF - True Type Font handling functions</br> | * SDL2-TTF - True Type Font handling functions</br> | ||
These subsystems can be installed | These subsystems can be installed, libsdl2 is pulled in as a dependency, by executing the following:</br> | ||
<console> | <console> | ||
###i## emerge media-libs/ | ###i## emerge media-libs/sdl2-gfx media-libs/sdl2-image media-libs/sdl2-mixer media-libs/sdl2-net media-libs/sdl2-ttf | ||
</console> | |||
or more simply using shell brace expansion: | |||
<console> | |||
###i## emerge media-libs/sdl2-{gfx,image,mixer,net,ttf} | |||
</console> | </console> | ||
== Further Reading == | == Further Reading == |
Revision as of 03:19, February 16, 2019
Simple DirectMedia Layer
We welcome improvements to this page. To edit this page, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.
Introduction
Simple DirectMedia Layer is commonly referred to by its acronym sdl. There are two versions of the sdl libraries commonly used: sdl and sdl2. The distinction is all libraries pre-version 2.0 are sdl while post-version 2.0 are sdl2. Version in this case is important as post-2.0 release involved a major changed to the SDL code base with non-backwards compatible changes to its API.
sdl (pre-2.0) is considered outdated and new development with sdl is discouraged. Components of sdl and sdl2 cannot be intermixed.
This page covers sdl2 only.
Usage(Simple)
Applications may only require the presence of the core sdl2 library. For this, executing below should be sufficient:
root # emerge media-libs/libsdl2
Usage(Source)
Some game applications that are built from sources may also require additional SDL2 component libraries below:
- SDL2-GFX - Graphics drawing primitives library for SDL2
- SDL2-Image - Image file loading library
- SDL2-Mixer - Audio and sound mixing functionality
- SDL2-Net - Networking support
- SDL2-TTF - True Type Font handling functions
These subsystems can be installed, libsdl2 is pulled in as a dependency, by executing the following:
root # emerge media-libs/sdl2-gfx media-libs/sdl2-image media-libs/sdl2-mixer media-libs/sdl2-net media-libs/sdl2-ttf
or more simply using shell brace expansion:
root # emerge media-libs/sdl2-{gfx,image,mixer,net,ttf}
Further Reading
Simple DirectMedia Layer Wiki Home Page
Wikipedia - Simple DirectMedia Layer
Flare Game Engine - example of needing SDL2 source install
Lazy Foo Productions - SDL2 programming tutorial