SDL_GetPixelFormatDetails3
Create an sdl_pixelformatdetails structure corresponding to a pixel format.
Usage
#include "SDL3/SDL.h"
const SDL_PixelFormatDetails * SDL_GetPixelFormatDetails(SDL_PixelFormat format);
Header file
Defined in SDL3/SDL_pixels.h
Overview
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
- format
-
one of the
SDL_PixelFormat
values.
Return value
(const SDL_PixelFormatDetails
*) Returns a pointer to a SDL_PixelFormatDetails
structure or NULL on failure; call SDL_GetError () for more information.
Thread safety
It is safe to call this function from any thread.