pub struct SurfaceConfiguration {
pub maximum_frame_latency: u32,
pub present_mode: PresentMode,
pub composite_alpha_mode: CompositeAlphaMode,
pub format: TextureFormat,
pub color_space: SurfaceColorSpace,
pub extent: Extent3d,
pub usage: TextureUses,
pub view_formats: Vec<TextureFormat>,
pub keep_presented: bool,
}Fields§
§maximum_frame_latency: u32Maximum number of queued frames. Must be in
SurfaceCapabilities::maximum_frame_latency range.
present_mode: PresentModeVertical synchronization mode.
composite_alpha_mode: CompositeAlphaModeAlpha composition mode.
format: TextureFormatFormat of the surface textures.
color_space: SurfaceColorSpaceColor space in which the presentation engine interprets the surface
textures. Never wgt::SurfaceColorSpace::Auto; wgpu-core resolves
Auto to a concrete color space before configuring the surface, and
the (format, color space) pair must be listed in
SurfaceCapabilities::formats.
extent: Extent3dRequested texture extent. Must be in
SurfaceCapabilities::extents range.
usage: TextureUsesAllowed usage of surface textures,
view_formats: Vec<TextureFormat>Allows views of swapchain texture to have a different format than the texture does.
keep_presented: boolWhether an image the surface hands out again must hold every pixel it last presented, so a frame can draw only what changed (Cranpose fork): a Vulkan swapchain then draws the pixels other windows cover too, and a DXGI one keeps its buffers’ contents.