SDL_GetMasksForPixelFormat

Convert one of the enumerated pixel formats to a bpp value and RGBA masks.

extern (C) nothrow @nogc extern
bool
SDL_GetMasksForPixelFormat

Parameters

format SDL_PixelFormat

one of the SDL_PixelFormat values.

bpp int*

a bits per pixel value; usually 15, 16, or 32.

Rmask Uint32*

a pointer filled in with the red mask for the format.

Gmask Uint32*

a pointer filled in with the green mask for the format.

Bmask Uint32*

a pointer filled in with the blue mask for the format.

Amask Uint32*

a pointer filled in with the alpha mask for the format.

Return Value

Type: bool

true on success or false on failure; call SDL_GetError() for more information.

Threadsafety: It is safe to call this function from any thread.

See Also

Meta