pub struct AppConfig {
pub title: String,
pub width: u32,
pub height: u32,
pub vsync: bool,
pub fixed_timestep: Option<Duration>,
pub asset_root: PathBuf,
pub depth_format: Option<TextureFormat>,
pub msaa_samples: u32,
}Fields§
§title: String§width: u32§height: u32§vsync: bool§fixed_timestep: Option<Duration>Some(d) for deterministic fixed-step update; None for variable dt.
asset_root: PathBufAsset root directory. Defaults to ./assets.
depth_format: Option<TextureFormat>Depth attachment format. None (default) keeps the 2D path depth-less; Some(fmt)
(e.g. wgpu::TextureFormat::Depth32Float) allocates a depth buffer for depth-tested
rendering. The built-in 2D pipelines never write depth, so enabling it is harmless.
msaa_samples: u32MSAA sample count for the surface. 1 (default) disables MSAA; 2/4/8 enable it
(the value must be supported by the adapter for the surface format).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AppConfig
impl RefUnwindSafe for AppConfig
impl Send for AppConfig
impl Sync for AppConfig
impl Unpin for AppConfig
impl UnsafeUnpin for AppConfig
impl UnwindSafe for AppConfig
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
Mutably borrows from an owned value. Read more
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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.