|
Size: 6794
Comment:
|
Size: 5872
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 6: | Line 6: |
| #pragma section-numbers off | #pragma section-numbers 2 |
| Line 36: | Line 36: |
| '''''Video''''' | ''''' Video''''' |
| Line 38: | Line 38: |
| * Set a video mode at any depth (8-bpp or greater) with optional conversion, if the video mode is not supported by the hardware. * Write directly to a linear graphics framebuffer. * Create surfaces with colorkey or alpha blending attributes. * Surface blits are automatically converted to the target format using optimized blitters and are hardware accelerated, when possible. MMX optimized blits are available for the x86. * Hardware accelerated blit and fill operations are used if supported by the hardware. |
* Set a video mode at any depth (8-bpp or greater) with optional conversion, if the video mode is not supported by the hardware * Write directly to a linear graphics framebuffer * Create surfaces with colorkey or alpha blending attributes * Surface blits are automatically converted to the target format using optimized blitters and are hardware accelerated, when possible. MMX optimized blits are available for the x86 * Hardware accelerated blit and fill operations are used if supported by the hardware * Window Management * Rendering |
| Line 44: | Line 46: |
| '''''Input''''' | ''''' Input''''' |
| Line 52: | Line 54: |
| * Each event can be enabled or disabled with SDL_!EventState(). * Events are passed through a user-specified filter function before being posted to the internal event queue. * Thread-safe event queue. |
* Each event can be enabled or disabled with SDL_!EventState() * Events are passed through a user-specified filter function before being posted to the internal event queue * Thread-safe event queue |
| Line 56: | Line 58: |
| '''''Force Feedback''''' | ''''' Force Feedback''''' |
| Line 58: | Line 60: |
| * Force feedback is supported under Windows, Mac OSX and Linux. | * Force feedback is supported under Windows, Mac OSX and Linux |
| Line 62: | Line 64: |
| * Set audio playback of 8-bit and 16-bit audio, mono or stereo, with optional conversion if the format is not supported by the hardware. * Audio runs independently in a separate thread, filled via a user callback mechanism. * Designed for custom software audio mixers, but the example archive contains a complete audio/music output library. |
* Set audio playback of 8-bit and 16-bit audio, mono or stereo, with optional conversion if the format is not supported by the hardware * Audio runs independently in a separate thread, filled via a user callback mechanism * Designed for custom software audio mixers, but the example archive contains a complete audio/music output library '''''File I/O Abstraction''''' * General purpose abstraction for opening, reading and writing data * Built-in support for files and memory |
| Line 84: | Line 91: |
| * Detect MMX, SSE, 3DNow and AltiVec CPU features |
|
| Line 95: | Line 104: |
| '''''Windows''''' * Two versions, one safe for all systems based on Win32 APIs, and one with higher performance, based on DirectX APIs * Safe version uses GDI for video display. High performance version uses !Direct3D for video display, taking advantage of modern hardware acceleration * Safe version uses waveOut APIs for sound. High performance version uses !DirectSound for audio playback '''''Mac OSX''''' * Uses Cocoa for video display, taking advantage of OpenGL for hardware acceleration * Uses Core Audio for sound |
|
| Line 97: | Line 117: |
| * Uses X11 for video display, taking advantage of XFree86 DGA extensions and new MTRR acceleration for fullscreen display. * Uses the OSS API for sound. * Threads are implemented using either the clone() system call and SysV IPC, or glibc-2.1 pthreads. |
* Uses X11 for video display, taking advantage of OpenGL for hardware acceleration * Uses the ALSA, OSS and !PulseAudio APIs for sound |
| Line 101: | Line 120: |
| '''''Windows''''' * Two versions, one safe for all systems based on Win32 APIs, and one with higher performance, based on DirectX APIs. * Safe version uses GDI for video display. High performance version uses !DirectDraw for video display, taking advantage of hardware acceleration if available. * Safe version uses waveOut APIs for sound. High performace version uses !DirectSound for audio playback. '''''Mac OS''''' * more info? === Special features in SDL 1.3 === |
== Special features in SDL 1.3 == |
| Line 113: | Line 122: |
| * Support for OpenGL 3.0 | * Support for OpenGL 3.0+ |
| Line 119: | Line 128: |
| Interesting starting points: * RecentChanges: see where people are currently working * WikiSandBox: feel free to change this page and experiment with editing * FindPage: search or browse the database in various ways * HelpOnMoinWikiSyntax: quick access to wiki markup * SiteNavigation: get an overview over this site and what it contains == How to use this site == A Wiki is a collaborative site, anyone can contribute and share: * Edit any page by pressing '''<<GetText(Edit)>>''' at the top or the bottom of the page * Create a link to another page with joined capitalized words (like WikiSandBox) or with {{{[[words in brackets]]}}} * Search for page titles or text within pages using the search box at the top of any page * See HelpForBeginners to get you going, HelpContents for all help pages. * For customizing MoinMoin's language support see HelpOnLanguages. To learn more about what a WikiWikiWeb is, read about MoinMoin:WhyWikiWorks and the MoinMoin:WikiNature. Also, consult the HelpMiscellaneous/FrequentlyAskedQuestions page. |
Simple DirectMedia Layer 1.3 Wiki
This wiki is your portal to documentation and other resources for SDL 1.3.
Contents
1. Using the SDL documentation Wiki
Use the links under the Navigation Links heading on the left-hand menu to access:
Registered users can use the Edit links under the Page Actions heading on the left-hand menu to add or update content in the wiki. For help using the editing functions see the MoinMoin Wiki Help pages, also available at any time from the Wiki Help link under the Navigation Links heading.
2. Introduction to SDL
2.1. What is SDL?
The Simple DirectMedia Layer library (SDL) is a general API that provides low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D framebuffer across multiple platforms.
The current version (1.3) supports Windows, Windows CE, Mac OS X, Linux, FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, and QNX. The code contains support for other operating systems but these are not officially supported.
SDL is written in C, but works with C++ natively, and has bindings to several other languages, including Ada, C#, Eiffel, Erlang, Euphoria, Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP, Pike, Pliant, Python, Ruby, and Smalltalk.
This library is distributed under GNU LGPL [<- link to licensing info] version 2. This license allows you to use SDL freely in commercial programs as long as you link with the dynamic library. A full commercial license for SDL 1.3 is available from Galaxy Gameworks.
2.2. What can SDL do?
Video
- Set a video mode at any depth (8-bpp or greater) with optional conversion, if the video mode is not supported by the hardware
- Write directly to a linear graphics framebuffer
- Create surfaces with colorkey or alpha blending attributes
- Surface blits are automatically converted to the target format using optimized blitters and are hardware accelerated, when possible. MMX optimized blits are available for the x86
- Hardware accelerated blit and fill operations are used if supported by the hardware
- Window Management
- Rendering
Input
- Events provided for:
- Application visibility changes
- Keyboard input
- Mouse input
- Joystick input
- User-requested quit
Each event can be enabled or disabled with SDL_EventState()
- Events are passed through a user-specified filter function before being posted to the internal event queue
- Thread-safe event queue
Force Feedback
- Force feedback is supported under Windows, Mac OSX and Linux
Audio
- Set audio playback of 8-bit and 16-bit audio, mono or stereo, with optional conversion if the format is not supported by the hardware
- Audio runs independently in a separate thread, filled via a user callback mechanism
- Designed for custom software audio mixers, but the example archive contains a complete audio/music output library
File I/O Abstraction
- General purpose abstraction for opening, reading and writing data
- Built-in support for files and memory
Shared Object Support
- Load shared objects (DLL on Windows, .dylib on Mac OSX, .so on Linux)
- Lookup functions in shared objects
Threads
- Simple thread creation API
- Simple binary semaphores for synchronization
Timers
- Get the number of milliseconds elapsed
- Wait a specified number of milliseconds
- Set a single periodic timer with 10ms resolution
CPU Feature Detection
Detect MMX, SSE, 3DNow and AltiVec CPU features
Power Management
- Querying power management status
Endian Independence
- Detect the endianness of the current system
- Routines for fast swapping of data values
- Read and write data of a specified endianness
2.3. What platforms does SDL run on?
Windows
- Two versions, one safe for all systems based on Win32 APIs, and one with higher performance, based on DirectX APIs
- Safe version uses GDI for video display. High performance version uses !Direct3D for video display, taking advantage of modern hardware acceleration
Safe version uses waveOut APIs for sound. High performance version uses DirectSound for audio playback
Mac OSX
- Uses Cocoa for video display, taking advantage of OpenGL for hardware acceleration
- Uses Core Audio for sound
Linux
- Uses X11 for video display, taking advantage of OpenGL for hardware acceleration
Uses the ALSA, OSS and PulseAudio APIs for sound
3. Special features in SDL 1.3
- Full 3D hardware acceleration
- Support for OpenGL 3.0+
- Support for multiple windows
- Support for multiple displays
- Support for multiple mice, tablets, etc.
- Force Feedback available on Windows, Mac OS X and Linux
This wiki is powered by MoinMoin.
