Added support for textures with palettes

Closes https://github.com/libsdl-org/SDL/pull/6192
This commit is contained in:
Sam Lantinga
2025-09-26 11:44:04 -07:00
parent d42bf59c66
commit 0b4b254a53
11 changed files with 728 additions and 74 deletions

View File

@@ -1257,6 +1257,8 @@ SDL3_0.0.0 {
SDL_hid_get_properties;
SDL_GetPixelFormatFromGPUTextureFormat;
SDL_GetGPUTextureFormatFromPixelFormat;
SDL_SetTexturePalette;
SDL_GetTexturePalette;
# extra symbols go here (don't modify this line)
local: *;
};

View File

@@ -1283,3 +1283,5 @@
#define SDL_GetPixelFormatFromGPUTextureFormat SDL_GetPixelFormatFromGPUTextureFormat_REAL
#define SDL_GetGPUTextureFormatFromPixelFormat SDL_GetGPUTextureFormatFromPixelFormat_REAL
#define JNI_OnLoad JNI_OnLoad_REAL
#define SDL_SetTexturePalette SDL_SetTexturePalette_REAL
#define SDL_GetTexturePalette SDL_GetTexturePalette_REAL

View File

@@ -1291,3 +1291,5 @@ SDL_DYNAPI_PROC(SDL_PropertiesID,SDL_hid_get_properties,(SDL_hid_device *a),(a),
SDL_DYNAPI_PROC(SDL_PixelFormat,SDL_GetPixelFormatFromGPUTextureFormat,(SDL_GPUTextureFormat a),(a),return)
SDL_DYNAPI_PROC(SDL_GPUTextureFormat,SDL_GetGPUTextureFormatFromPixelFormat,(SDL_PixelFormat a),(a),return)
SDL_DYNAPI_PROC(Sint32,JNI_OnLoad,(JavaVM *a, void *b),(a,b),return)
SDL_DYNAPI_PROC(bool,SDL_SetTexturePalette,(SDL_Texture *a,SDL_Palette *b),(a,b),return)
SDL_DYNAPI_PROC(SDL_Palette*,SDL_GetTexturePalette,(SDL_Texture *a),(a),return)