#[repr(transparent)]pub struct SDL_GPUSwapchainComposition(pub c_uint);Expand description
Specifies the texture format and colorspace of the swapchain textures.
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.
Available Since: This enum is available since SDL 3.2.0.
See Also: SDL_SetGPUSwapchainParameters See Also: SDL_WindowSupportsGPUSwapchainComposition See Also: SDL_WaitAndAcquireGPUSwapchainTexture
Tuple Fields§
§0: c_uintImplementations§
Source§impl SDL_GPUSwapchainComposition
impl SDL_GPUSwapchainComposition
pub const SDL_GPU_SWAPCHAINCOMPOSITION_SDR: SDL_GPUSwapchainComposition
pub const SDL_GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR: SDL_GPUSwapchainComposition
pub const SDL_GPU_SWAPCHAINCOMPOSITION_HDR_EXTENDED_LINEAR: SDL_GPUSwapchainComposition
pub const SDL_GPU_SWAPCHAINCOMPOSITION_HDR10_ST2084: SDL_GPUSwapchainComposition
Trait Implementations§
Source§impl Clone for SDL_GPUSwapchainComposition
impl Clone for SDL_GPUSwapchainComposition
Source§fn clone(&self) -> SDL_GPUSwapchainComposition
fn clone(&self) -> SDL_GPUSwapchainComposition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SDL_GPUSwapchainComposition
impl Debug for SDL_GPUSwapchainComposition
Source§impl Hash for SDL_GPUSwapchainComposition
impl Hash for SDL_GPUSwapchainComposition
impl Copy for SDL_GPUSwapchainComposition
impl Eq for SDL_GPUSwapchainComposition
impl StructuralPartialEq for SDL_GPUSwapchainComposition
Auto Trait Implementations§
impl Freeze for SDL_GPUSwapchainComposition
impl RefUnwindSafe for SDL_GPUSwapchainComposition
impl Send for SDL_GPUSwapchainComposition
impl Sync for SDL_GPUSwapchainComposition
impl Unpin for SDL_GPUSwapchainComposition
impl UnsafeUnpin for SDL_GPUSwapchainComposition
impl UnwindSafe for SDL_GPUSwapchainComposition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more