Note

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

Difference between revisions of "Package:Simple DirectMedia Layer"

From Funtoo
Jump to navigation Jump to search
(Edit console commands)
(Display components as table)
 
Line 18: Line 18:


== Usage(Source) ==
== Usage(Source) ==
Some game applications that are built from sources may also require additional SDL2 component libraries below:
Some game applications may also require additional SDL2 component libraries below:
* SDL2-GFX - Graphics drawing primitives library for SDL2
{{TableStart}}
* SDL2-Image - Image file loading library
{{2ColHead|Component|Description}}
* SDL2-Mixer - Audio and sound mixing functionality
{{2Col|{{c|SDL2-GFX}}|Graphics drawing primitives library for SDL2}}
* SDL2-Net - Networking support
{{2Col|{{c|SDL2-Image}}|Image file loading library}}
* SDL2-TTF - True Type Font handling functions</br>
{{2Col|{{c|SDL2-Mixer}}|Audio and sound mixing functionality}}
{{2Col|{{c|SDL2-Net}}|Networking support}}
{{2Col|{{c|SDL2-TTF}}|True Type Font handling functions}}
{{TableEnd}}</br>


These subsystems can be installed, libsdl2 is pulled in as a dependency, by executing the following:</br>
These subsystems can be installed, libsdl2 is pulled in as a dependency, by executing the following:</br>

Latest revision as of 03:33, February 16, 2019

Simple DirectMedia Layer

   Tip

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 may also require additional SDL2 component libraries below:

ComponentDescription
SDL2-GFXGraphics drawing primitives library for SDL2
SDL2-ImageImage file loading library
SDL2-MixerAudio and sound mixing functionality
SDL2-NetNetworking support
SDL2-TTFTrue 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