Add some high bit-depth pixel formats

These are not fully supported yet, just preparing for future work.
main
Sam Lantinga 2024-01-25 16:39:53 -08:00
parent 5ab879f89a
commit 0f78aa7c30
1 changed files with 41 additions and 3 deletions

View File

@ -129,9 +129,11 @@ typedef enum
{
SDL_ARRAYORDER_NONE,
SDL_ARRAYORDER_RGB,
SDL_ARRAYORDER_UNUSED1, /* Left for compatibility with SDL2 */
SDL_ARRAYORDER_UNUSED2, /* Left for compatibility with SDL2 */
SDL_ARRAYORDER_BGR
SDL_ARRAYORDER_RGBA,
SDL_ARRAYORDER_ARGB,
SDL_ARRAYORDER_BGR,
SDL_ARRAYORDER_BGRA,
SDL_ARRAYORDER_ABGR
} SDL_ArrayOrder;
/** Packed component layout. */
@ -316,6 +318,42 @@ typedef enum
SDL_PIXELFORMAT_ABGR2101010 =
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ABGR,
SDL_PACKEDLAYOUT_2101010, 32, 4),
SDL_PIXELFORMAT_R16G16B16 =
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU16, SDL_ARRAYORDER_RGB, 0,
48, 3),
SDL_PIXELFORMAT_B16G16R16 =
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU16, SDL_ARRAYORDER_BGR, 0,
48, 3),
SDL_PIXELFORMAT_R16G16B16A16 =
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU16, SDL_ARRAYORDER_RGBA, 0,
64, 4),
SDL_PIXELFORMAT_A16R16G16B16 =
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU16, SDL_ARRAYORDER_ARGB, 0,
64, 4),
SDL_PIXELFORMAT_B16G16R16A16 =
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU16, SDL_ARRAYORDER_BGRA, 0,
64, 4),
SDL_PIXELFORMAT_A16B16G16R16 =
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU16, SDL_ARRAYORDER_ABGR, 0,
64, 4),
SDL_PIXELFORMAT_R16G16B16_F16 =
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF16, SDL_ARRAYORDER_RGB, 0,
48, 3),
SDL_PIXELFORMAT_B16G16R16_F16 =
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF16, SDL_ARRAYORDER_BGR, 0,
48, 3),
SDL_PIXELFORMAT_R16G16B16A16_F16 =
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF16, SDL_ARRAYORDER_RGBA, 0,
64, 4),
SDL_PIXELFORMAT_A16R16G16B16_F16 =
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF16, SDL_ARRAYORDER_ARGB, 0,
64, 4),
SDL_PIXELFORMAT_B16G16R16A16_F16 =
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF16, SDL_ARRAYORDER_BGRA, 0,
64, 4),
SDL_PIXELFORMAT_A16B16G16R16_F16 =
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF16, SDL_ARRAYORDER_ABGR, 0,
64, 4),
/* Aliases for RGBA byte arrays of color data, for the current platform */
#if SDL_BYTEORDER == SDL_BIG_ENDIAN