FACTOID # 63: Brazil takes up 47.8% of South America.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > Simple DirectMedia Layer
Simple DirectMedia Layer

Logo
Developer: Sam Lantinga
Latest release: 1.2.11 / June 26, 2006
OS: Cross-platform
Use: API
License: GNU Lesser General Public License
Website: libsdl.org

Simple DirectMedia Layer (SDL) is a cross-platform multimedia free software library written in C that creates an abstraction over various platforms' graphics, sound, and input APIs, allowing a developer to write a computer game or other multimedia application once and run it on many operating systems including GNU/Linux, Windows and Mac OS X. It manages video, events, digital audio, CD-ROM, sound, threads, shared object loading, networking and timers. SDL Logo. ... Software development is the translation of a user need or marketing goal into a software product. ... A software release refers to the creation and availability of a new version of a computer software product. ... June 26 is the 177th day of the year (178th in leap years) in the Gregorian Calendar, with 188 days remaining. ... For the Manfred Mann album, see 2006 (album). ... An operating system (OS) is a computer program that manages the hardware and software resources of a computer. ... A cross-platform (or platform independent) programming language, software application or hardware device works on more than one system platform (e. ... A application programming interface (API) is the interface that a computer system, library or application provides in order to allow requests for services to be made of it by other computer programs, and/or to allow data to be exchanged between them. ... A software license is a legal agreement which may take the form of a proprietary or gratuitous license as well as a memorandum of contract between a producer and a user of computer software. ... GNU logo The GNU Lesser General Public License (formerly the GNU Library General Public License) is a free software license published by the Free Software Foundation. ... A website (or Web site) is a collection of web pages, typically common to a particular domain name or subdomain on the World Wide Web on the Internet. ... This article is about free software as defined by the sociopolitical free software movement; for information on software distributed without charge, see freeware. ... In computer science, a library is a collection of subprograms used to develop software. ... Wikibooks has a book on the topic of C Programming The C programming language (often, just C) is a general-purpose, procedural, imperative computer programming language developed in the early 1970s by Dennis Ritchie for use on the Unix operating system. ... It has been suggested that CG artwork be merged into this article or section. ... A application programming interface (API) is the interface that a computer system, library or application provides in order to allow requests for services to be made of it by other computer programs, and/or to allow data to be exchanged between them. ... A computer game is a game composed of a computer-controlled virtual universe that players interact with in order to achieve a defined goal or set of goals. ... This article or section does not cite its references or sources. ... It has been suggested that this article or section be merged with Linux distributions. ... Microsoft Windows is the name of several families of proprietary software operating systems by Microsoft. ... Mac OS X (official IPA pronunciation: ) is a line of proprietary, graphical operating systems developed, marketed, and sold by Apple Inc. ...

Contents

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). Several other free libraries appeared to work with SDL, such as SMPEG and OpenAL. Sam Oscar Lantinga is the creator of the Simple DirectMedia Layer which is a very popular open source game programming library. ... 1998 (MCMXCVIII) was a common year starting on Thursday of the Gregorian calendar, and was designated the International Year of the Ocean. ... Loki Games was a software firm that ported several computer games from Microsoft Windows to Linux. ... Doom (or DOOM)[1] is a 1993 computer game by id Software that is among the landmark titles in the first-person shooter genre. ... BeOS is an operating system for personal computers which began development by Be Inc. ... A Doom source port is a source port of the Doom engine, the game engine used by the computer game Doom. ... SMPEG is short for the SDL MPEG library originally developed by Loki Software. ... OpenAL (Open Audio Library) is a cross-platform audio API. It is designed for efficient rendering of multichannel three dimensional positional audio. ...


The SDL library has bindings with almost every programming language there is, from the popular (C++, Perl, Python (through pygame), Pascal etc.) to the less known (such as Euphoria or Pliant). This and the fact that it is open-source and licensed under the LGPL make SDL a common choice for many multimedia applications. C++ (pronounced see plus plus, IPA: ) is a general-purpose, high-level programming language with low-level facilities. ... Perl is a dynamic programming language created by Larry Wall and first released in 1987. ... Python is a programming language created by Guido van Rossum in 1990. ... Pygame is a cross-platform computer graphics library designed to be used with the Python programming language. ... Pascal is an imperative computer programming language, developed in 1970 by Niklaus Wirth as a language particularly suitable for structured programming. ... Euphoria is an interpreted programming language conceived and created by Robert Craig of Rapid Deployment Software. ... The Pliant programming language is based on a dynamic compiler, which makes it act like it is interpreted. ... GNU logo The GNU Lesser General Public License (formerly the GNU Library General Public License) is an FSF approved Free Software license designed as a compromise between the GNU General Public License and simple permissive licenses such as the BSD license and the MIT License. ...


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. OpenGL is often used with SDL to provide fast 3D rendering. It is often thought of as a cross-platform DirectX, although it lacks some of its more advanced functionality. SDL instead has a huge number of third party extensions that make it easy to do more advanced functions. OpenGL (Open Graphics Library) is a standard specification defining a cross-language cross-platform API for writing applications that produce 3D computer graphics (and 2D computer graphics as well). ... DirectX is a collection of APIs for handling tasks related to multimedia, especially game programming, on Microsoft platforms. ...


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 additional functionality. These comprise the "standard library", and are provided on the official website and included in the official documentation: OpenGL (Open Graphics Library) is a standard specification defining a cross-language cross-platform API for writing applications that produce 3D computer graphics (and 2D computer graphics as well). ...

  • SDL_image - Is used in conjunction with SDL to provide support for modern image formats. It is maintained by Sam Lantinga and Mattias EngdegĂ„rd, and is currently able to load the following formats: BMP, PPM, XPM, PCX, GIF, JPEG, PNG, and TGA. This extension is necessary since the main SDL library only provides a way to load and save in the BMP format. Although SDL_image adds support for loading images, there is currently no way of saving images in any other format than the BMP. Besides the core SDL library, SDL_image also needs the IJG, PNG, Zlib and SGI TIFF libraries for loading some of the formats. In the C/C++ binding, SDL_image provides the function IMG_Load( const char* ) and a few variations all of which return a pointer to a SDL_Surface where the loaded image is stored.
  • 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).

Sam Oscar Lantinga is the creator of the Simple DirectMedia Layer which is a very popular open source game programming library. ... DIB redirects here. ... The portable pixmap file format (PPM), the portable graymap file format (PGM) and the portable bitmap file format (PBM) specify rules for exchanging graphics files. ... XPM (X PixMap) is an ASCII image format used by the X Window System. ... PCX is an image file format that uses a simple form of run-length encoding (a type of lossless compression algorithm). ... An example of a GIF image. ... In computing, JPEG (pronounced JAY-peg; IPA: ) is a commonly used standard method of compression for photographic images. ... A PNG image with an 8-bit transparency channel (top). ... Truevisions TGA File Format, often referred to as TARGA File Format, is a raster graphics file format. ... DIB redirects here. ... DIB redirects here. ... C is a general-purpose, procedural, imperative computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system. ... TrueType is an outline font standard originally developed by Apple Computer in the late 1980s as a competitor to Adobes Type 1 fonts used in PostScript. ... The Rich Text Format (often abbreviated to RTF) is a proprietary document file format developed and owned by Microsoft since 1987 for cross-platform document interchange. ...

Architecture

Abstraction layers of several SDL platforms
Abstraction layers of several SDL platforms

SDL has the word "layer" in its title because it is actually a wrapper around operating-system-specific functionality. The chief purpose of SDL is to provide a common framework for accessing this functionality. Image File history File links SDL_Layers. ... Image File history File links SDL_Layers. ...


Because of the way SDL is designed, a lot of the source code is split into separate modules for each operating system, in order to make calls to the underlying system. When SDL is compiled, the correct modules are selected for the target system.


On Microsoft Windows, SDL actually wraps around DirectX, which in turn wraps around the video driver; SDL is useful for porting to Windows, but merely replicates DirectX functions otherwise. Older versions used DirectX 5, but SDL 1.2 (the current stable release) requires DirectX 7 by default. Sam Lantinga has stated that he plans to use DirectX 8 in future SDL releases[1]. Microsoft Windows is the name of several families of proprietary software operating systems by Microsoft. ... DirectX is a collection of APIs for handling tasks related to multimedia, especially game programming, on Microsoft platforms. ...


On X11 platforms, including Linux, SDL uses Xlib to communicate with the X11 system for graphics and events. In computing, the X Window System (commonly X11 or X) is a windowing system for bitmap displays. ... It has been suggested that this article or section be merged with Linux distributions. ... Xlib is an X Window System protocol client library in the C programming language. ...


Syntax and subsystems

Main article: SDL syntax

The syntax of SDL is function-based, all operations done in SDL are done by passing parameters to functions. Special structures are also used to store the specific information SDL needs to handle. There are a few different subsystems SDL categorizes its functions under: The syntax of Simple DirectMedia Layer (SDL) is a set of rules and functions that allow one to use the library. ...

The syntax of Simple DirectMedia Layer (SDL) is a set of rules and functions that allow one to use the library. ... Many programming languages, operating systems, and other software development environments support what are called threads of execution. ... An event handler is a part of a computer program created to tell the program how to act in response to a specific event (e. ... The syntax of Simple DirectMedia Layer (SDL) is a set of rules and functions that allow one to use the library. ... The syntax of Simple DirectMedia Layer (SDL) is a set of rules and functions that allow one to use the library. ... The syntax of Simple DirectMedia Layer (SDL) is a set of rules and functions that allow one to use the library. ... The syntax of Simple DirectMedia Layer (SDL) is a set of rules and functions that allow one to use the library. ...

Example Code (C)

 // Headers #include "SDL.h" // Main function int main( int argc, char* argv[] ) { // Initialize SDL if( SDL_Init( SDL_INIT_EVERYTHING ) == -1 ) return( 1 ); // Delay 2 seconds SDL_Delay( 2000 ); // Quit SDL SDL_Quit(); // Return return( 0 ); } 

A very basic SDL program. It loads SDL subsystems, pauses for 2 seconds, closes SDL, then exits the program.


Games using SDL

See List of games using SDL for a more complete list Abuse-SDL Aleph One Anvil of Thyrion Battle for Wesnoth Bug Squish BZFlag Cannon Smash Circus Linux! Creatures Docking Station Cube Daimonin Client D1X Descent II D2X Defendguin Dominions Eat the Whistle GPLed version Entombed! Exult Freeciv FreeCNC Freelords Frozen Bubble Fuhquake GearHead Gem Drop X GLTron Heretic Homeworld...


Extensions

  • SMPEG - SDL MPEG Player Library
  • Guichan and ParaGUI - Widget Sets
  • GGI - a free cross-platform graphics interface

SMPEG is short for the SDL MPEG library originally developed by Loki Software. ... Guichan is a C++ GUI library designed for games. ... General Graphics Interface (GGI), is an active Free software project that aims to develop a reliable, stable and fast FOSS graphics system that works everywhere. ...

See also

Free software Portal
  • Allegro
  • OpenML
  • DirectX
  • OpenGL
  • pygame [2] - a wrapper around SDL for Python
  • SDL.NET - a .NET wrapper for SDL written in C#
  • CRM32Pro - High level API built around SDL which provide you with all functions needed to develop games

Image File history File links Floss_draft. ... The Allegro library logo. ... OpenML logo Open Media Library (OpenML) is a free, cross-platform programming environment designed by the Khronos Group for capturing, transporting, processing, displaying, and synchronizing digital media (2D and 3D graphics, audio and video processing, I/O, and networking). ... DirectX is a collection of APIs for handling tasks related to multimedia, especially game programming, on Microsoft platforms. ... OpenGL (Open Graphics Library) is a standard specification defining a cross-language cross-platform API for writing applications that produce 3D computer graphics (and 2D computer graphics as well). ... Pygame is a cross-platform computer graphics library designed to be used with the Python programming language. ... Python is a programming language created by Guido van Rossum in 1990. ... SDL.NET is a set of object-oriented CLS-compliant . ...

External links

  • SDL website
  • SDL.NET homepage
  • GameDev - a site dedicated to game development, programming, et cetera. Discussion space can be found here on gamedev.
  • GLFW - an open source, portable API, in many ways similar to SDL, but with focus on OpenGL contexting.
  • The Game Programming Wiki's SDL Tutorials
  • The SDL Documentation

  Results from FactBites:
 
Simple DirectMedia Layer - Wikipedia, the free encyclopedia (281 words)
The SDL is mainly coded in C but has bindings to many languages and exists on several operating systems.
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.
OpenGL is often used with SDL to provide fast 3D rendering.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.