pub struct DesktopConfig { /* private fields */ }Expand description
Window and presentation settings fixed before the desktop loop starts.
Implementations§
Source§impl DesktopConfig
impl DesktopConfig
Sourcepub fn set_text_batching(&mut self, enabled: bool) -> &mut Self
pub fn set_text_batching(&mut self, enabled: bool) -> &mut Self
Groups adjacent same-atlas labels into retained glyph batches (default).
Groups contain at most 256 labels and never cross geometry or images.
Disable for the individual-run baseline. Has no effect without text.
Sourcepub const fn text_batching(&self) -> bool
pub const fn text_batching(&self) -> bool
Returns whether the native bridge groups adjacent managed labels.
Sourcepub fn set_screen_mode(&mut self, mode: DesktopScreenMode) -> &mut Self
pub fn set_screen_mode(&mut self, mode: DesktopScreenMode) -> &mut Self
Chooses compact/prepared retention or the legacy streaming baseline. Set before starting the host. Scene admission still uses RenderLimits; retained resources mirror current runs, with bounded old/new overlap.
Sourcepub const fn screen_mode(&self) -> DesktopScreenMode
pub const fn screen_mode(&self) -> DesktopScreenMode
Returns the chosen screen geometry route.
Sourcepub fn set_window_mode(&mut self, mode: WindowMode) -> &mut Self
pub fn set_window_mode(&mut self, mode: WindowMode) -> &mut Self
Selects startup mode, without changing monitor video modes. An unavailable explicit monitor rejects startup. OS submission is not visual confirmation.
Sourcepub const fn window_mode(&self) -> WindowMode
pub const fn window_mode(&self) -> WindowMode
Returns the startup mode (windowed by default).
Sourcepub fn new(
title: impl Into<String>,
logical_width: f64,
logical_height: f64,
) -> Result<Self, DesktopConfigError>
pub fn new( title: impl Into<String>, logical_width: f64, logical_height: f64, ) -> Result<Self, DesktopConfigError>
Creates validated settings for one logical-size window.
Sourcepub fn set_present_mode(
&mut self,
present_mode: RendererPresentMode,
) -> &mut Self
pub fn set_present_mode( &mut self, present_mode: RendererPresentMode, ) -> &mut Self
Selects synchronized or fastest-available presentation.
Sourcepub fn set_frame_cache_budget(&mut self, budget: FrameCacheBudget) -> &mut Self
pub fn set_frame_cache_budget(&mut self, budget: FrameCacheBudget) -> &mut Self
Sets Engine’s idle composition-cache limits independently of active frame limits.
Zero cache limits disable retention, not drawing. This does not bound image/font assets, 3D scene resources, driver memory or in-flight work. Defaults to Engine’s finite cache budget, including packed uniform uploads.
Sourcepub const fn frame_cache_budget(&self) -> FrameCacheBudget
pub const fn frame_cache_budget(&self) -> FrameCacheBudget
Returns the separate idle composition-cache budget.
Sourcepub fn set_gpu_timing(&mut self, enabled: bool) -> &mut Self
pub fn set_gpu_timing(&mut self, enabled: bool) -> &mut Self
Requests bounded asynchronous GPU pass timestamps, disabled by default.
Unsupported adapters still start and report Engine’s Unavailable status.
Collection never waits for the GPU; query/readback resources and polling
add explicitly reported diagnostic overhead. CPU and presentation time
are not substituted for missing measurements.
Sourcepub const fn gpu_timing(&self) -> bool
pub const fn gpu_timing(&self) -> bool
Returns whether optional GPU diagnostics were requested, not availability.
Sourcepub const fn logical_width(&self) -> f64
pub const fn logical_width(&self) -> f64
Returns the initial logical width.
Sourcepub const fn logical_height(&self) -> f64
pub const fn logical_height(&self) -> f64
Returns the initial logical height.
Sourcepub const fn present_mode(&self) -> RendererPresentMode
pub const fn present_mode(&self) -> RendererPresentMode
Returns the requested presentation behavior.
Trait Implementations§
Source§impl Clone for DesktopConfig
impl Clone for DesktopConfig
Source§impl Debug for DesktopConfig
impl Debug for DesktopConfig
Source§impl Default for DesktopConfig
impl Default for DesktopConfig
Source§impl PartialEq for DesktopConfig
impl PartialEq for DesktopConfig
impl StructuralPartialEq for DesktopConfig
Auto Trait Implementations§
impl Freeze for DesktopConfig
impl RefUnwindSafe for DesktopConfig
impl Send for DesktopConfig
impl Sync for DesktopConfig
impl Unpin for DesktopConfig
impl UnsafeUnpin for DesktopConfig
impl UnwindSafe for DesktopConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
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
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> FromTemplate for T
impl<T> FromTemplate for T
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
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> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Template for T
impl<T> Template for T
Source§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
entity context to produce a Template::Output.Source§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clone.