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,
}Expand description
Configures a Surface for presentation.
Fields
usage: TextureUsagesThe usage of the swap chain. The only supported usage is RENDER_ATTACHMENT.
format: TextureFormatThe texture format of the swap chain. The only formats that are guaranteed are
Bgra8Unorm and Bgra8UnormSrgb
width: u32Width of the swap chain. Must be the same size as the surface.
height: u32Height of the swap chain. Must be the same size as the surface.
present_mode: PresentModePresentation mode of the swap chain. FIFO is the only guaranteed to be supported, though other formats will automatically fall back to FIFO.
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<'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
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 !=.
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 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
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
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.