Frequently Asked Questions: General


Table Of Contents


Q:What is Simple DirectMedia Layer?
A:Very simply, Simple DirectMedia Layer, or SDL for short, is a library that allows you low level access to a video framebuffer, audio output, mouse, keyboard, and joysticks across a wide variety of operating systems.

Q:What platforms are supported?
A:The current version supports Linux, Windows, BeOS, MacOS, MacOS X, FreeBSD, OpenBSD, BSD/OS, Solaris, and IRIX.

The code contains support for Windows CE, AmigaOS, Atari, QNX, NetBSD, AIX, OSF/Tru64, and SymbianOS, but these are not yet officially supported.


Q:What is the latest version?
A:The latest stable version is 1.2
You can always get the very latest bleeding edge CVS snapshot, which may be broken at any given time, from the CVS page.

Q:Where can I get it?
A:http://www.libsdl.org/

Q:What's up with SDL 2.0? Can I help?
A:SDL 2.0 will be a full redesign of the SDL functionality, based on what we've learned over the past four years. The architecture design is partially done, and we'll start prototyping the design soon. As soon as there's a working framework, we'll make it publicly available for comment and contributions. This new framework has about a year or so before we anticipate it being ready for stable release.

Q:Is SDL multi-threaded?
A:SDL provides simple cross-platform functions for the creation of threads and synchronization using mutexes. These are used internally by SDL for some implementations of the audio subsystem and input handling.

Q:Does SDL support 3D acceleration?
A:Yes, SDL supports 3D acceleration using the OpenGL API.

Q:Does SDL support networking?
A:Networking is outside of the scope of SDL, but due to popular demand a simple cross-platform sockets wrapper called "SDL_net" is available at the SDL libraries page. A simple chat client/server is included which makes use of an example GUI library as well.

Q:Does SDL support PCX, JPG, PNG, etc...
A:The BMP and WAV file loaders included with SDL are simple examples demonstrating how to load an image and sound format. You should be able to write your own reader for any format. The main library is suppose to be fast and small, and so does not include any additional loaders.
A sample image loader library called "SDL_image" is available from the SDL libraries page which supports loading BMP, PCX, GIF, JPG, PNG and TGA images to SDL surfaces.

Q:Does SDL support MP3, Ogg Vorbis, etc...
A:The BMP and WAV file loaders included with SDL are simple examples demonstrating how to load an image and sound format. You should be able to write your own reader for any format. The main library is suppose to be fast and small, and so does not include any additional loaders. A sample sound library called "SDL_sound" is available from the SDL libraries page which supports loading many different audio formats.

Q:Does SDL have text drawing support?
A:Games and operating systems vary widely in the type and availability of text drawing facilities. Instead of trying to deal with this in the core SDL library, there are several text drawing libraries designed for use with SDL on the SDL libraries page. Common tecniques include using bitmap fonts, truetype fonts, and custom images for text.

Q:What kind of GUI's are there for SDL?
A:There are several GUI libraries available from the SDL libraries page.
There is also a demo on the SDL demos page of using GTk natively with SDL, which works really well for graphics output.
Also on the demos page is a hack written by Kent Mein using Tcl/Tk with SDL.
You may also be able to get other GUI's to work with SDL. Many of them have documentation on how to get the toolkits to work with other applications.