table of contents
SDL_CreatePixelFormat(3) | SDL3 FUNCTIONS | SDL_CreatePixelFormat(3) |
NAME¶
SDL_CreatePixelFormat - Create an SDL_PixelFormat
structure corresponding to a pixel format.
HEADER FILE¶
Defined in SDL3/SDL_pixels.h
SYNOPSIS¶
#include "SDL3/SDL.h"
SDL_PixelFormat * SDL_CreatePixelFormat(SDL_PixelFormatEnum pixel_format);
DESCRIPTION¶
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 Blitcombinationnotsupported may occur.
FUNCTION PARAMETERS¶
- pixel_format
- one of the SDL_PixelFormatEnum
values
RETURN VALUE¶
Returns the new SDL_PixelFormat
structure or NULL on failure; call SDL_GetError () for more
information.
AVAILABILITY¶
This function is available since SDL 3.0.0.
SEE ALSO¶
SDL_DestroyPixelFormat(3), SDL_SetPixelFormatPalette(3)
SDL 3.1.2 | Simple Directmedia Layer |