Ads 468x60px

Pages

Kamis, 15 Agustus 2013

Learning SDL Simple DirectMedia Layer

Easy Learn Computer - SDL
Simple DirectMedia Layer (SDL) library is a free cross-platform multimedia, written in C, which creates an abstraction layer on top of various software platforms, graphics and sound and thus can control the video, digital audio, CD-ROM drive, sound, string, load sharing of objects, timer and network.

This abstraction allows programmers to write multimedia applications once and run on many operating systems: the official version supports Linux, Windows, BeOS, MacOS and Mac OS X, FreeBSD, OpenBSD, BSD / OS, Solaris, IRIX, and QNX source code, but does not offer official support for Windows CE, AmigaOS, Dreamcast, Atari, NetBSD, AIX, OSF/Tru64, RISC OS, and SymbianOS.

The history.
Sam Lantinga created the library, originally released in early 1998, while working for Loki Software. It occurred to him when he took the application from Windows to Macintosh. He used to bring Doom SDL under BeOS (see the Doom source ports). Some other free libraries seem to be working with SDL, OpenAL, and SMPEG it.

The library has a link to almost any existing programming language from the euphoria of the popular C + +, Perl, Python (via pygame), Pascal conosiuti less like or pliable. That and the fact that it is licensed under the LGPL, SDL is a common choice for multimedia applications.

SDL itself is very simple: It only works as a wrapper that provides a lightweight, multi-platform support for 2D operations on pixels, sound, file access, event handling, timers, threads, and much more. It is often used as a supplement to the OpenGL graphics output settings and provide input mouse and keyboard, which is beyond the scope of OpenGL.

The library is divided into several subsystems, such as video nominees (both surface and function to handle OpenGL), Audio, CD-ROM, joystick and timer subsystem. Apart from the basic low-level support, there are several libraries that provide additional functionality official support. These include the "standard library" provided on the official website and incorporated into official documentation:

* SDL_image - support for multiple image formats
* SDL_mixer - complex audio functions, especially for sound mixing
* SDL_net - network support
* SDL_ttf - support for TrueType font rendering
* SDL_rtf - Render simple Rich Text Format

SDL has the word "layer" in the title because it really is a wrapper function through a specific operating system. The main goal of the SDL is to provide a common framework to access this feature.
For the SDL is designed as a bunch of source code is divided into separate modules for each operating system in order to make calls to the underlying operating system. When SDL is compiled, the correct form selected for the appropriate operating system.

In Microsoft Windows, SDL provides a wrapper for DirectX, which in turn is a wrapper for the driver. DirectX version 5 using SDL, but SDL 1.2 (current stable release) requires DirectX 7 by default. Sam Lantinga has begun plans to use DirectX 8 in future releases of SDL [1].

On the X11 platform, including Linux, SDL Xlib is used to communicate with X11 graphics for the event.

In Mac OS X uses Quartz SDL.

Subsystem and syntax.

The syntax of the SDL is based on the function, all transactions made in the SDL run by passing parameters to functions. Special facilities are also used to store specific information that you need to use SDL. There are different SDL subsystems to characterize the function below:

* The video subsystem, events and threads - this provides management functionality for video, multi-threading, and events.
* Audio subsystem - provides audio capability.
* Timer Subsystem
* Subsystem joystick
* CD-ROM Subsystem

Related Posts by Categories

0 komentar:

Posting Komentar