Skip to main content

SDL_GetMasksForPixelFormat

Function SDL_GetMasksForPixelFormat 

Source
pub unsafe extern "C" fn SDL_GetMasksForPixelFormat(
    format: SDL_PixelFormat,
    bpp: *mut c_int,
    Rmask: *mut Uint32,
    Gmask: *mut Uint32,
    Bmask: *mut Uint32,
    Amask: *mut Uint32,
) -> bool
Expand description

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

Parameter: format one of the SDL_PixelFormat values. Parameter: bpp a bits per pixel value; usually 15, 16, or 32. Parameter: Rmask a pointer filled in with the red mask for the format. Parameter: Gmask a pointer filled in with the green mask for the format. Parameter: Bmask a pointer filled in with the blue mask for the format. Parameter: Amask a pointer filled in with the alpha mask for the format. Returns: true on success or false on failure; call SDL_GetError() for more information.

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

Available Since: This function is available since SDL 3.2.0.

See Also: SDL_GetPixelFormatForMasks