Function sdl2_sys::SDL_MasksToPixelFormatEnum
source · pub unsafe extern "C" fn SDL_MasksToPixelFormatEnum(
bpp: c_int,
Rmask: Uint32,
Gmask: Uint32,
Bmask: Uint32,
Amask: Uint32,
) -> Uint32
Expand description
Convert a bpp value and RGBA masks to an enumerated pixel format.
This will return SDL_PIXELFORMAT_UNKNOWN
if the conversion wasn’t
possible.
\param bpp a bits per pixel value; usually 15, 16, or 32 \param Rmask the red mask for the format \param Gmask the green mask for the format \param Bmask the blue mask for the format \param Amask the alpha mask for the format \returns one of the SDL_PixelFormatEnum values
\since This function is available since SDL 2.0.0.
\sa SDL_PixelFormatEnumToMasks