mirror of https://github.com/libsdl-org/SDL.git
Currently, all SDL_Surfaces with an indexed pixel format have an associated SDL_Palette. This palette either consists of entirely the colour black, or -- in the special case of 1-bit surfaces, black and white. When an indexed surface is blitted to another indexed surface, a 'map' is generated from the source surface's palette to the destination surfaces palette, in order to preserve the look of the image if the palettes differ. However, in most cases, applications will want to blit the raw index values, rather than translate to make the colours as similar as possible. For instance, the destination surface's palette may have been modified to fade the screen out. This change allows an indexed surface to have no associated palette. If either the source or destination surface of a blit do not have a palette, then the raw indices are copied (assuming both have an indexed format). This mimics better what happens with most other APIs (such as DirectDraw), where most users do not set a palette on any surface but the screen, whose palette is implicitly used for the whole application. |
||
|---|---|---|
| .github | ||
| VisualC | ||
| VisualC-GDK | ||
| VisualC-WinRT | ||
| Xcode | ||
| android-project | ||
| build-scripts | ||
| cmake | ||
| docs | ||
| include | ||
| mingw/pkg-support | ||
| src | ||
| test | ||
| wayland-protocols | ||
| .clang-format | ||
| .clang-tidy | ||
| .editorconfig | ||
| .gitignore | ||
| .wikiheaders-options | ||
| Android.mk | ||
| BUGS.txt | ||
| CMakeLists.txt | ||
| CREDITS.md | ||
| INSTALL.md | ||
| LICENSE.txt | ||
| README-SDL.txt | ||
| README.md | ||
| WhatsNew.txt | ||
README.md
Simple DirectMedia Layer (SDL) Version 3.0
Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware. It is used by video playback software, emulators, and popular games including Valve's award winning catalog and many Humble Bundle games.
More extensive documentation is available in the docs directory, starting with README.md. If you are migrating to SDL 3.0 from SDL 2.0, the changes are extensively documented in README-migration.md.
Enjoy!
Sam Lantinga (slouken@libsdl.org)