Struct wgpu::SurfaceConfiguration
source · 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§
source§impl Clone for SurfaceConfiguration
impl Clone for SurfaceConfiguration
source§fn clone(&self) -> SurfaceConfiguration
fn clone(&self) -> SurfaceConfiguration
Returns a copy 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 SurfaceConfiguration
impl Debug for SurfaceConfiguration
source§impl<'de> Deserialize<'de> for SurfaceConfiguration
impl<'de> Deserialize<'de> for SurfaceConfiguration
source§fn 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
source§impl Hash for SurfaceConfiguration
impl Hash for SurfaceConfiguration
source§impl PartialEq<SurfaceConfiguration> for SurfaceConfiguration
impl PartialEq<SurfaceConfiguration> for SurfaceConfiguration
source§fn eq(&self, other: &SurfaceConfiguration) -> bool
fn eq(&self, other: &SurfaceConfiguration) -> bool
source§impl Serialize for SurfaceConfiguration
impl Serialize for SurfaceConfiguration
source§fn 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§
source§impl<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,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.