Struct wgpu_hal::SurfaceCapabilities[][src]

pub struct SurfaceCapabilities {
    pub formats: Vec<TextureFormat>,
    pub swap_chain_sizes: RangeInclusive<u32>,
    pub current_extent: Option<Extent3d>,
    pub extents: RangeInclusive<Extent3d>,
    pub usage: TextureUses,
    pub present_modes: Vec<PresentMode>,
    pub composite_alpha_modes: Vec<CompositeAlphaMode>,
}
Expand description

Describes information about what a Surface’s presentation capabilities are. Fetch this with Adapter::surface_capabilities.

Fields

formats: Vec<TextureFormat>

List of supported texture formats.

Must be at least one.

swap_chain_sizes: RangeInclusive<u32>

Range for the swap chain sizes.

  • swap_chain_sizes.start must be at least 1.
  • swap_chain_sizes.end must be larger or equal to swap_chain_sizes.start.
current_extent: Option<Extent3d>

Current extent of the surface, if known.

extents: RangeInclusive<Extent3d>

Range of supported extents.

current_extent must be inside this range.

usage: TextureUses

Supported texture usage flags.

Must have at least TextureUses::COLOR_TARGET

present_modes: Vec<PresentMode>

List of supported V-sync modes.

Must be at least one.

composite_alpha_modes: Vec<CompositeAlphaMode>

List of supported alpha composition modes.

Must be at least one.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.