SDL_GetPixelFormatDetails(3)

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.

Availability

This function is available since SDL 3.2.0.

From libsdl3-doc 3.2.10+ds-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.