Simple DirectMedia Layer - Design

Design

SDL itself is very simple; it merely acts as a thin, cross-platform wrapper, providing support for 2D pixel operations, sound, file access, event handling, timing, threading, and more. It is often used to complement OpenGL by setting up the graphical output and providing mouse and keyboard input, which are beyond the scope of OpenGL.

The library is divided into several subsystems, namely the video (handles both surface functions and OpenGL), audio, CD-ROM, joystick, and timer subsystems. 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
  • SDL_mixer — complex audio functions, mainly for sound mixing
  • SDL_net — networking support
  • SDL_ttf — TrueType font rendering support
  • SDL_rtf — simple Rich Text Format rendering

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

The SDL library has language bindings for many programming languages, from the popular (C, C++, Pascal, Perl, Python (via Pygame), etc.) to the less known languages such as Ch (via ChSDL), Euphoria and Pliant. This, and it being open-source and licensed under the LGPL, makes SDL a common choice for many multimedia applications.

Read more about this topic:  Simple DirectMedia Layer

Famous quotes containing the word design:

    If I knew for a certainty that a man was coming to my house with the conscious design of doing me good, I should run for my life ... for fear that I should get some of his good done to me,—some of its virus mingled with my blood.
    Henry David Thoreau (1817–1862)

    I begin with a design for a hearse.
    For Christ’s sake not black—
    nor white either—and not polished!
    Let it be weathered—like a farm wagon—
    William Carlos Williams (1883–1963)