pub struct WindowDescriptor {Show 14 fields
pub width: u32,
pub height: u32,
pub title: &'static str,
pub decorations: bool,
pub resizable: bool,
pub power_preference: PowerPreference,
pub backends: Backends,
pub features: Features,
pub control_flow: ControlFlow,
pub present_mode: PresentMode,
pub limits: Limits,
pub alpha_mode: CompositeAlphaMode,
pub desired_maximum_frame_latency: u32,
pub memory_hints: MemoryHints,
}Expand description
Descriptor and settings for a window.
Fields§
§width: u32The width of the window
height: u32The height of the window
title: &'static strThe title of the window
decorations: boolShould the window contain the keys like minimize, maximize, or resize?
resizable: boolShould the window be resizable
power_preference: PowerPreferenceDefine how much power should the app ask for
backends: BackendsThe backend to use for the draw
features: FeaturesThe features to be enabled on a backend
read more at wgpu::Features
control_flow: ControlFlowControls how the events are processed
read more at winit::event_loop::ControlFlow
present_mode: PresentModeThe presentation mode of renderer for things like VSync
read more at wgpu::PresentMode
limits: LimitsLimits to be required based on the generation of the GPU and the API.
read more at wgpu::Limits
alpha_mode: CompositeAlphaModeThe alpha mode which specifies how the alpha channel of the textures should be handled during compositing.
desired_maximum_frame_latency: u32The desired frame latency.
read more at wgpu::SurfaceConfiguration::desired_maximum_frame_latency
memory_hints: MemoryHintsHow the memory should be utilized
read more at wgpu::MemoryHints
Trait Implementations§
Source§impl Clone for WindowDescriptor
impl Clone for WindowDescriptor
Source§fn clone(&self) -> WindowDescriptor
fn clone(&self) -> WindowDescriptor
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WindowDescriptor
impl Debug for WindowDescriptor
Source§impl Default for WindowDescriptor
impl Default for WindowDescriptor
Source§fn default() -> WindowDescriptor
fn default() -> WindowDescriptor
Will quickly create a window with default settings
impl Send for WindowDescriptor
impl Sync for WindowDescriptor
Auto Trait Implementations§
impl Freeze for WindowDescriptor
impl RefUnwindSafe for WindowDescriptor
impl Unpin for WindowDescriptor
impl UnwindSafe for WindowDescriptor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().