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_GPUSwapchainComposition - Specifies the texture format and colorspace of the swapchain textures.

Availability

       This enum is available since SDL 3.2.0.

Description

       SDR will always be supported. Other compositions may not be supported on certain systems.

       It is recommended to query

       SDL_WindowSupportsGPUSwapchainComposition

       after claiming the window if you wish to change the swapchain composition from SDR.

       • SDR: B8G8R8A8 or R8G8B8A8 swapchain. Pixel values are in sRGB encoding.

       • SDR_LINEAR: B8G8R8A8_SRGB or R8G8B8A8_SRGB swapchain. Pixel values are
         stored in memory in sRGB encoding but accessed in shaders in "linear
         sRGB" encoding which is sRGB but with a linear transfer function.

       • HDR_EXTENDED_LINEAR: R16G16B16A16_FLOAT swapchain. Pixel values are in
         extended linear sRGB encoding and permits values outside of the [0, 1]
         range.

       • HDR10_ST2084: A2R10G10B10 or A2B10G10R10 swapchain. Pixel values are in
         BT.2020 ST2084 (PQ) encoding.

Header File

       Defined in SDL3/SDL_gpu.h

Name

       SDL_GPUSwapchainComposition - Specifies the texture format and colorspace of the swapchain textures.

See Also

(3),   SDL_SetGPUSwapchainParameters(3),   (3),   SDL_WindowSupportsGPUSwapchainComposition(3),   (3),
       SDL_WaitAndAcquireGPUSwapchainTexture(3)

Simple Directmedia Layer                           SDL 3.2.10                 SDL_GPUSwapchainComposition(3type)

Synopsis

#include"SDL3/SDL.h"typedefenumSDL_GPUSwapchainComposition{SDL_GPU_SWAPCHAINCOMPOSITION_SDR,SDL_GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR,SDL_GPU_SWAPCHAINCOMPOSITION_HDR_EXTENDED_LINEAR,SDL_GPU_SWAPCHAINCOMPOSITION_HDR10_ST2084}SDL_GPUSwapchainComposition;

See Also