Go to file
Sam Lantinga 875c4f0a4c Support indexed surfaces without palettes (thanks @sulix!)
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.
2024-07-11 08:31:32 -07:00
.github ci: bump NetBSD and FreeBSD 2024-07-11 08:12:42 -07:00
VisualC Simplified SDL_Surface 2024-07-10 00:48:18 -07:00
VisualC-GDK Simplified SDL_Surface 2024-07-10 00:48:18 -07:00
VisualC-WinRT Simplified SDL_Surface 2024-07-10 00:48:18 -07:00
Xcode main: Move SDL_RunApp bits from src/core to src/main. 2024-07-05 08:52:25 -07:00
android-project android: create android project in create-android-project.py python script 2024-07-05 21:12:26 +02:00
build-scripts video: Rename SDL_GL_DeleteContext to SDL_GL_DestroyContext. 2024-07-10 15:54:08 -04:00
cmake Simplified SDL_Surface 2024-07-10 00:48:18 -07:00
docs Support indexed surfaces without palettes (thanks @sulix!) 2024-07-11 08:31:32 -07:00
include video: Rename SDL_GL_DeleteContext to SDL_GL_DestroyContext. 2024-07-10 15:54:08 -04:00
mingw/pkg-support mingw: use DESTDIR to change the install location of the mingw package 2024-07-07 20:35:33 +02:00
src Support indexed surfaces without palettes (thanks @sulix!) 2024-07-11 08:31:32 -07:00
test Support indexed surfaces without palettes (thanks @sulix!) 2024-07-11 08:31:32 -07:00
wayland-protocols video: Expose HDR metadata per-window 2024-06-20 15:55:07 -04:00
.clang-format Add 'wl_list_for_each_safe' to the clang-format macro list 2024-03-14 10:22:23 -04:00
.clang-tidy
.editorconfig .editorconfig: Remove excess apostrophe at *.cocci 2024-06-16 09:18:17 -07:00
.gitignore audio: Refer to audio devices to "playback" and "recording". 2024-06-15 01:08:12 -04:00
.wikiheaders-options wikiheaders: bridge wiki Category docs to the headers! 2024-05-16 11:48:23 -04:00
Android.mk Create a functional CMake project using androidbuild.sh 2024-06-18 00:11:44 +02:00
BUGS.txt
CMakeLists.txt cmake: build ci and and release with static runtime library 2024-07-10 19:47:27 +02:00
CREDITS.md docs: Moved CREDITS and INSTALL to markdown format. 2023-11-29 12:31:27 -05:00
INSTALL.md Updated INSTALL.md 2024-04-10 09:18:42 -04:00
LICENSE.txt Updated copyright for 2024 2024-01-01 13:15:26 -08:00
README-SDL.txt
README.md Tweaking documentation for the SDL 3.0 preview release 2024-03-24 06:16:02 -07:00
WhatsNew.txt audio: Refer to audio devices to "playback" and "recording". 2024-06-15 01:08:12 -04:00

README.md

Simple DirectMedia Layer (SDL) Version 3.0

https://www.libsdl.org/

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)