#[repr(transparent)]pub struct SDL_GPUSwapchainComposition(pub c_int);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.
§Availability
This enum is available since SDL 3.2.0.
§See also
SDL_SetGPUSwapchainParametersSDL_WindowSupportsGPUSwapchainCompositionSDL_WaitAndAcquireGPUSwapchainTexture
§Known values (sdl3-sys)
Tuple Fields§
§0: c_intImplementations§
Source§impl SDL_GPUSwapchainComposition
impl SDL_GPUSwapchainComposition
pub const SDR: Self
pub const SDR_LINEAR: Self
pub const HDR_EXTENDED_LINEAR: Self
pub const HDR10_ST2084: Self
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
Available on crate feature debug-impls only.
impl Debug for SDL_GPUSwapchainComposition
Available on crate feature
debug-impls only.Source§impl Default for SDL_GPUSwapchainComposition
impl Default for SDL_GPUSwapchainComposition
Source§fn default() -> SDL_GPUSwapchainComposition
fn default() -> SDL_GPUSwapchainComposition
Returns the “default value” for a type. Read more
Source§impl From<SDL_GPUSwapchainComposition> for c_int
impl From<SDL_GPUSwapchainComposition> for c_int
Source§fn from(value: SDL_GPUSwapchainComposition) -> Self
fn from(value: SDL_GPUSwapchainComposition) -> Self
Converts to this type from the input type.
Source§impl GroupMetadata for SDL_GPUSwapchainComposition
Available on crate feature metadata only.
impl GroupMetadata for SDL_GPUSwapchainComposition
Available on crate feature
metadata only.Source§const GROUP_METADATA: &'static Group
const GROUP_METADATA: &'static Group
Metadata for this group
Source§impl Hash for SDL_GPUSwapchainComposition
impl Hash for SDL_GPUSwapchainComposition
Source§impl Ord for SDL_GPUSwapchainComposition
impl Ord for SDL_GPUSwapchainComposition
Source§fn cmp(&self, other: &SDL_GPUSwapchainComposition) -> Ordering
fn cmp(&self, other: &SDL_GPUSwapchainComposition) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq<SDL_GPUSwapchainComposition> for c_int
impl PartialEq<SDL_GPUSwapchainComposition> for c_int
Source§impl PartialEq<i32> for SDL_GPUSwapchainComposition
impl PartialEq<i32> for SDL_GPUSwapchainComposition
Source§impl PartialOrd for SDL_GPUSwapchainComposition
impl PartialOrd 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 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