Struct wgpu::SurfaceConfiguration
source · [−]#[repr(C)]pub struct SurfaceConfiguration {
pub usage: TextureUsages,
pub format: TextureFormat,
pub width: u32,
pub height: u32,
pub present_mode: PresentMode,
pub alpha_mode: CompositeAlphaMode,
}
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.
alpha_mode: CompositeAlphaMode
Specifies how the alpha channel of the textures should be handled during compositing.
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 moresourceimpl Debug for SurfaceConfiguration
impl Debug for SurfaceConfiguration
sourceimpl<'de> Deserialize<'de> for SurfaceConfiguration
impl<'de> Deserialize<'de> for SurfaceConfiguration
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<SurfaceConfiguration, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<SurfaceConfiguration, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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
sourceimpl Serialize for SurfaceConfiguration
impl Serialize for SurfaceConfiguration
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.