SDL_GetPixelFormatForMasks

Convert a bpp value and RGBA masks to an enumerated pixel format.

This will return SDL_PIXELFORMAT_UNKNOWN if the conversion wasn't possible.

extern (C) nothrow @nogc extern
SDL_GetPixelFormatForMasks

Parameters

bpp int

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

Rmask Uint32

the red mask for the format.

Gmask Uint32

the green mask for the format.

Bmask Uint32

the blue mask for the format.

Amask Uint32

the alpha mask for the format.

Return Value

the SDL_PixelFormat value corresponding to the format masks, or SDL_PIXELFORMAT_UNKNOWN if there isn't a match.

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

See Also

Meta