Function SDL_GetMasksForPixelFormat
pub unsafe extern "C" fn SDL_GetMasksForPixelFormat(
format: SDL_PixelFormat,
bpp: *mut i32,
Rmask: *mut u32,
Gmask: *mut u32,
Bmask: *mut u32,
Amask: *mut u32,
) -> bool
Available on crate feature
dep_sdl3
only.Expand description
Convert one of the enumerated pixel formats to a bpp value and RGBA masks.
§Parameters
format
: one of theSDL_PixelFormat
values.bpp
: a bits per pixel value; usually 15, 16, or 32.Rmask
: a pointer filled in with the red mask for the format.Gmask
: a pointer filled in with the green mask for the format.Bmask
: a pointer filled in with the blue mask for the format.Amask
: a pointer filled in with the alpha mask for the format.
§Return value
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.
§Availability
This function is available since SDL 3.2.0.