Function sdl2_sys::SDL_AllocFormat

source ·
pub unsafe extern "C" fn SDL_AllocFormat(
    pixel_format: Uint32
) -> *mut SDL_PixelFormat
Expand description

Create an SDL_PixelFormat structure corresponding to a pixel format.

Returned structure may come from a shared global cache (i.e. not newly allocated), and hence should not be modified, especially the palette. Weird errors such as Blit combination not supported may occur.

\param pixel_format one of the SDL_PixelFormatEnum values \returns the new SDL_PixelFormat structure or NULL on failure; call SDL_GetError() for more information.

\since This function is available since SDL 2.0.0.

\sa SDL_FreeFormat