Struct wgpu_types::SurfaceConfiguration
source · [−]#[repr(C)]pub struct SurfaceConfiguration {
pub usage: TextureUsages,
pub format: TextureFormat,
pub width: u32,
pub height: u32,
pub present_mode: PresentMode,
}
Expand description
Configures a Surface
for presentation.
Fields
usage: TextureUsages
The usage of the swap chain. The only supported usage is RENDER_ATTACHMENT
.
format: TextureFormat
The texture format of the swap chain. The only formats that are guaranteed are
Bgra8Unorm
and Bgra8UnormSrgb
width: u32
Width of the swap chain. Must be the same size as the surface.
height: u32
Height of the swap chain. Must be the same size as the surface.
present_mode: PresentMode
Presentation mode of the swap chain. Fifo is the only mode guaranteed to be supported. FifoRelaxed, Immediate, and Mailbox will crash if unsupported, while AutoVsync and AutoNoVsync will gracefully do a designed sets of fallbacks if their primary modes are unsupported.
Trait Implementations
sourceimpl Clone for SurfaceConfiguration
impl Clone for SurfaceConfiguration
sourcefn clone(&self) -> SurfaceConfiguration
fn clone(&self) -> SurfaceConfiguration
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SurfaceConfiguration
impl Debug for SurfaceConfiguration
sourceimpl Hash for SurfaceConfiguration
impl Hash for SurfaceConfiguration
sourceimpl PartialEq<SurfaceConfiguration> for SurfaceConfiguration
impl PartialEq<SurfaceConfiguration> for SurfaceConfiguration
sourcefn eq(&self, other: &SurfaceConfiguration) -> bool
fn eq(&self, other: &SurfaceConfiguration) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SurfaceConfiguration) -> bool
fn ne(&self, other: &SurfaceConfiguration) -> bool
This method tests for !=
.
impl Eq for SurfaceConfiguration
impl StructuralEq for SurfaceConfiguration
impl StructuralPartialEq for SurfaceConfiguration
Auto Trait Implementations
impl RefUnwindSafe for SurfaceConfiguration
impl Send for SurfaceConfiguration
impl Sync for SurfaceConfiguration
impl Unpin for SurfaceConfiguration
impl UnwindSafe for SurfaceConfiguration
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more