logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_GetPixelFormatDetails - Create an SDL_PixelFormatDetails structure corresponding to a pixel format.

Availability

       This function is available since SDL 3.2.0.

Simple Directmedia Layer                           SDL 3.2.20                       SDL_GetPixelFormatDetails(3)

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

format one of the SDL_PixelFormat values.

Name

       SDL_GetPixelFormatDetails - Create an SDL_PixelFormatDetails structure corresponding to a pixel format.

Return Value

       Returns a pointer to a SDL_PixelFormatDetails structure or NULL on failure; call SDL_GetError() for  more
       information.

Synopsis

#include<SDL3/SDL_pixels.h>constSDL_PixelFormatDetails*SDL_GetPixelFormatDetails(SDL_PixelFormatformat);

Thread Safety

       It is safe to call this function from any thread.

See Also