mirror of
https://github.com/Ryujinx/SDL2-CS.git
synced 2025-01-10 19:15:28 +00:00
Fix endianness assumption, make PIXELFORMATs readonly.
This commit is contained in:
parent
2377195ecc
commit
7dd9cf4272
447
src/SDL2.cs
447
src/SDL2.cs
|
@ -1390,203 +1390,237 @@ namespace SDL2
|
|||
SDL_PACKEDLAYOUT_1010102
|
||||
}
|
||||
|
||||
/* FIXME: These should all be const!!! */
|
||||
public const uint SDL_PIXELFORMAT_UNKNOWN = 0;
|
||||
public static uint SDL_PIXELFORMAT_INDEX1LSB = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_INDEX1,
|
||||
SDL_PIXELORDER_ENUM.SDL_BITMAPORDER_4321,
|
||||
0,
|
||||
1, 0
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_INDEX1MSB = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_INDEX1,
|
||||
SDL_PIXELORDER_ENUM.SDL_BITMAPORDER_1234,
|
||||
0,
|
||||
1, 0
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_INDEX4LSB = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_INDEX4,
|
||||
SDL_PIXELORDER_ENUM.SDL_BITMAPORDER_4321,
|
||||
0,
|
||||
4, 0
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_INDEX4MSB = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_INDEX4,
|
||||
SDL_PIXELORDER_ENUM.SDL_BITMAPORDER_1234,
|
||||
0,
|
||||
4, 0
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_INDEX8 = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_INDEX8,
|
||||
0,
|
||||
0,
|
||||
8, 1
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_RGB332 = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED8,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_332,
|
||||
8, 1
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_RGB444 = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_4444,
|
||||
12, 2
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_RGB555 = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_1555,
|
||||
15, 2
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_BGR555 = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_INDEX1,
|
||||
SDL_PIXELORDER_ENUM.SDL_BITMAPORDER_4321,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_1555,
|
||||
15, 2
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_ARGB4444 = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_ARGB,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_4444,
|
||||
16, 2
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_RGBA4444 = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_RGBA,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_4444,
|
||||
16, 2
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_ABGR4444 = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_ABGR,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_4444,
|
||||
16, 2
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_BGRA4444 = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_BGRA,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_4444,
|
||||
16, 2
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_ARGB1555 = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_ARGB,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_1555,
|
||||
16, 2
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_RGBA5551 = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_RGBA,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_5551,
|
||||
16, 2
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_ABGR1555 = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_ABGR,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_1555,
|
||||
16, 2
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_BGRA5551 = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_BGRA,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_5551,
|
||||
16, 2
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_RGB565 = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_565,
|
||||
16, 2
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_BGR565 = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_XBGR,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_565,
|
||||
16, 2
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_RGB24 = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_ARRAYU8,
|
||||
SDL_PIXELORDER_ENUM.SDL_ARRAYORDER_RGB,
|
||||
0,
|
||||
24, 3
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_BGR24 = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_ARRAYU8,
|
||||
SDL_PIXELORDER_ENUM.SDL_ARRAYORDER_BGR,
|
||||
0,
|
||||
24, 3
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_RGB888 = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_8888,
|
||||
24, 4
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_RGBX8888 = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_RGBX,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_8888,
|
||||
24, 4
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_BGR888 = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_XBGR,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_8888,
|
||||
24, 4
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_BGRX8888 = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_BGRX,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_8888,
|
||||
24, 4
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_ARGB8888 = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_ARGB,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_8888,
|
||||
32, 4
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_RGBA8888 = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_RGBA,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_8888,
|
||||
32, 4
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_ABGR8888 = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_ABGR,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_8888,
|
||||
32, 4
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_BGRA8888 = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_BGRA,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_8888,
|
||||
32, 4
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_ARGB2101010 = SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_ARGB,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_2101010,
|
||||
32, 4
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_YV12 = SDL_DEFINE_PIXELFOURCC(
|
||||
(byte) 'Y', (byte) 'V', (byte) '1', (byte) '2'
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_IYUV = SDL_DEFINE_PIXELFOURCC(
|
||||
(byte) 'I', (byte) 'Y', (byte) 'U', (byte) 'V'
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_YUY2 = SDL_DEFINE_PIXELFOURCC(
|
||||
(byte) 'Y', (byte) 'U', (byte) 'Y', (byte) '2'
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_UYVY = SDL_DEFINE_PIXELFOURCC(
|
||||
(byte) 'U', (byte) 'Y', (byte) 'V', (byte) 'Y'
|
||||
);
|
||||
public static uint SDL_PIXELFORMAT_YVYU = SDL_DEFINE_PIXELFOURCC(
|
||||
(byte) 'Y', (byte) 'V', (byte) 'Y', (byte) 'U'
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_UNKNOWN = 0;
|
||||
public static readonly uint SDL_PIXELFORMAT_INDEX1LSB =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_INDEX1,
|
||||
SDL_PIXELORDER_ENUM.SDL_BITMAPORDER_4321,
|
||||
0,
|
||||
1, 0
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_INDEX1MSB =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_INDEX1,
|
||||
SDL_PIXELORDER_ENUM.SDL_BITMAPORDER_1234,
|
||||
0,
|
||||
1, 0
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_INDEX4LSB =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_INDEX4,
|
||||
SDL_PIXELORDER_ENUM.SDL_BITMAPORDER_4321,
|
||||
0,
|
||||
4, 0
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_INDEX4MSB =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_INDEX4,
|
||||
SDL_PIXELORDER_ENUM.SDL_BITMAPORDER_1234,
|
||||
0,
|
||||
4, 0
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_INDEX8 =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_INDEX8,
|
||||
0,
|
||||
0,
|
||||
8, 1
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_RGB332 =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED8,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_332,
|
||||
8, 1
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_RGB444 =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_4444,
|
||||
12, 2
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_RGB555 =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_1555,
|
||||
15, 2
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_BGR555 =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_INDEX1,
|
||||
SDL_PIXELORDER_ENUM.SDL_BITMAPORDER_4321,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_1555,
|
||||
15, 2
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_ARGB4444 =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_ARGB,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_4444,
|
||||
16, 2
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_RGBA4444 =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_RGBA,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_4444,
|
||||
16, 2
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_ABGR4444 =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_ABGR,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_4444,
|
||||
16, 2
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_BGRA4444 =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_BGRA,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_4444,
|
||||
16, 2
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_ARGB1555 =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_ARGB,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_1555,
|
||||
16, 2
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_RGBA5551 =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_RGBA,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_5551,
|
||||
16, 2
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_ABGR1555 =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_ABGR,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_1555,
|
||||
16, 2
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_BGRA5551 =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_BGRA,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_5551,
|
||||
16, 2
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_RGB565 =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_565,
|
||||
16, 2
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_BGR565 =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED16,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_XBGR,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_565,
|
||||
16, 2
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_RGB24 =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_ARRAYU8,
|
||||
SDL_PIXELORDER_ENUM.SDL_ARRAYORDER_RGB,
|
||||
0,
|
||||
24, 3
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_BGR24 =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_ARRAYU8,
|
||||
SDL_PIXELORDER_ENUM.SDL_ARRAYORDER_BGR,
|
||||
0,
|
||||
24, 3
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_RGB888 =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_8888,
|
||||
24, 4
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_RGBX8888 =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_RGBX,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_8888,
|
||||
24, 4
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_BGR888 =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_XBGR,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_8888,
|
||||
24, 4
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_BGRX8888 =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_BGRX,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_8888,
|
||||
24, 4
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_ARGB8888 =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_ARGB,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_8888,
|
||||
32, 4
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_RGBA8888 =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_RGBA,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_8888,
|
||||
32, 4
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_ABGR8888 =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_ABGR,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_8888,
|
||||
32, 4
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_BGRA8888 =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_BGRA,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_8888,
|
||||
32, 4
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_ARGB2101010 =
|
||||
SDL_DEFINE_PIXELFORMAT(
|
||||
SDL_PIXELTYPE_ENUM.SDL_PIXELTYPE_PACKED32,
|
||||
SDL_PIXELORDER_ENUM.SDL_PACKEDORDER_ARGB,
|
||||
SDL_PACKEDLAYOUT_ENUM.SDL_PACKEDLAYOUT_2101010,
|
||||
32, 4
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_YV12 =
|
||||
SDL_DEFINE_PIXELFOURCC(
|
||||
(byte) 'Y', (byte) 'V', (byte) '1', (byte) '2'
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_IYUV =
|
||||
SDL_DEFINE_PIXELFOURCC(
|
||||
(byte) 'I', (byte) 'Y', (byte) 'U', (byte) 'V'
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_YUY2 =
|
||||
SDL_DEFINE_PIXELFOURCC(
|
||||
(byte) 'Y', (byte) 'U', (byte) 'Y', (byte) '2'
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_UYVY =
|
||||
SDL_DEFINE_PIXELFOURCC(
|
||||
(byte) 'U', (byte) 'Y', (byte) 'V', (byte) 'Y'
|
||||
);
|
||||
public static readonly uint SDL_PIXELFORMAT_YVYU =
|
||||
SDL_DEFINE_PIXELFOURCC(
|
||||
(byte) 'Y', (byte) 'V', (byte) 'Y', (byte) 'U'
|
||||
);
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct SDL_Color
|
||||
|
@ -4140,17 +4174,14 @@ namespace SDL2
|
|||
public const ushort AUDIO_F32MSB = 0x9120;
|
||||
public const ushort AUDIO_F32 = AUDIO_F32LSB;
|
||||
|
||||
// FIXME: ASSUMING LITTLE ENDIAN!!!
|
||||
public const ushort AUDIO_U16SYS = AUDIO_U16LSB;
|
||||
public const ushort AUDIO_S16SYS = AUDIO_S16LSB;
|
||||
public const ushort AUDIO_S32SYS = AUDIO_S32LSB;
|
||||
public const ushort AUDIO_F32SYS = AUDIO_F32LSB;
|
||||
/* Big Endian
|
||||
public const ushort AUDIO_U16SYS = AUDIO_U16MSB;
|
||||
public const ushort AUDIO_S16SYS = AUDIO_S16MSB;
|
||||
public const ushort AUDIO_S32SYS = AUDIO_S32MSB;
|
||||
public const ushort AUDIO_F32SYS = AUDIO_F32MSB;
|
||||
*/
|
||||
public static readonly ushort AUDIO_U16SYS =
|
||||
BitConverter.IsLittleEndian ? AUDIO_U16LSB : AUDIO_U16MSB;
|
||||
public static readonly ushort AUDIO_S16SYS =
|
||||
BitConverter.IsLittleEndian ? AUDIO_S16LSB : AUDIO_S16MSB;
|
||||
public static readonly ushort AUDIO_S32SYS =
|
||||
BitConverter.IsLittleEndian ? AUDIO_S32LSB : AUDIO_S32MSB;
|
||||
public static readonly ushort AUDIO_F32SYS =
|
||||
BitConverter.IsLittleEndian ? AUDIO_F32LSB : AUDIO_F32MSB;
|
||||
|
||||
public const uint SDL_AUDIO_ALLOW_FREQUENCY_CHANGE = 0x00000001;
|
||||
public const uint SDL_AUDIO_ALLOW_FORMAT_CHANGE = 0x00000001;
|
||||
|
|
|
@ -47,11 +47,11 @@ namespace SDL2
|
|||
// FIXME: Allow user defined MIX_CHANNELS
|
||||
public const int MIX_CHANNELS = 8;
|
||||
|
||||
public const int MIX_DEFAULT_FREQUENCY = 22050;
|
||||
// FIXME: ASSUMING LITTLE ENDIAN!!! Big endian: SDL.AUDIO_S16MSB
|
||||
public const ushort MIX_DEFAULT_FORMAT = SDL.AUDIO_S16LSB;
|
||||
public const int MIX_DEFAULT_CHANNELS = 2;
|
||||
public const byte MIX_MAX_VOLUME = 128;
|
||||
public static readonly int MIX_DEFAULT_FREQUENCY = 22050;
|
||||
public static readonly ushort MIX_DEFAULT_FORMAT =
|
||||
BitConverter.IsLittleEndian ? SDL.AUDIO_S16LSB : SDL.AUDIO_S16MSB;
|
||||
public static readonly int MIX_DEFAULT_CHANNELS = 2;
|
||||
public static readonly byte MIX_MAX_VOLUME = 128;
|
||||
|
||||
[Flags]
|
||||
public enum MIX_InitFlags
|
||||
|
|
Loading…
Reference in a new issue