pub struct SoftwareBackendAppConfiguration {
pub viewport_builder: ViewportBuilder,
pub allow_raster_opt: bool,
pub convert_tris_to_rects: bool,
pub caching: bool,
}Expand description
Used to initialize the software render backend app, renderer, and winit configuration.
Fields§
§viewport_builder: ViewportBuilderThe underlying egui viewport builder that is used to create the window with winit.
allow_raster_opt: boolIf true: rasterized ClippedPrimitives are cached and rendered to an intermediate tiled canvas. That canvas is then rendered over the frame buffer. If false ClippedPrimitives are rendered directly to the frame buffer. Rendering without caching is much slower and primarily intended for testing.
Default is true!
convert_tris_to_rects: boolIf true: attempts to optimize by converting suitable triangle pairs into rectangles for faster rendering.
Things should look the same with this set to true while rendering faster.
Default is true!
caching: boolIf true: rasterized ClippedPrimitives are cached and rendered to an intermediate tiled canvas. That canvas is then rendered over the frame buffer. If false ClippedPrimitives are rendered directly to the frame buffer. Rendering without caching is much slower and primarily intended for testing.
Default is true!
Implementations§
Source§impl SoftwareBackendAppConfiguration
impl SoftwareBackendAppConfiguration
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new SoftwareBackendAppConfiguration using the default configuration.
Sourcepub fn viewport_builder(self, viewport_builder: ViewportBuilder) -> Self
pub fn viewport_builder(self, viewport_builder: ViewportBuilder) -> Self
This sets the egui viewport builder to the given builder. This replaces most settings.
Sourcepub fn title(self, title: Option<String>) -> Self
pub fn title(self, title: Option<String>) -> Self
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
Sourcepub fn app_id(self, app_id: Option<String>) -> Self
pub fn app_id(self, app_id: Option<String>) -> Self
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
Sourcepub const fn position(self, position: Option<Pos2>) -> Self
pub const fn position(self, position: Option<Pos2>) -> Self
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
Sourcepub const fn inner_size(self, inner_size: Option<Vec2>) -> Self
pub const fn inner_size(self, inner_size: Option<Vec2>) -> Self
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
Sourcepub const fn min_inner_size(self, min_inner_size: Option<Vec2>) -> Self
pub const fn min_inner_size(self, min_inner_size: Option<Vec2>) -> Self
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
Sourcepub const fn max_inner_size(self, max_inner_size: Option<Vec2>) -> Self
pub const fn max_inner_size(self, max_inner_size: Option<Vec2>) -> Self
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
Sourcepub const fn clamp_size_to_monitor_size(
self,
clamp_size_to_monitor_size: Option<bool>,
) -> Self
pub const fn clamp_size_to_monitor_size( self, clamp_size_to_monitor_size: Option<bool>, ) -> Self
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
Sourcepub const fn fullscreen(self, fullscreen: Option<bool>) -> Self
pub const fn fullscreen(self, fullscreen: Option<bool>) -> Self
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
Sourcepub const fn maximized(self, maximized: Option<bool>) -> Self
pub const fn maximized(self, maximized: Option<bool>) -> Self
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
Sourcepub const fn resizable(self, resizable: Option<bool>) -> Self
pub const fn resizable(self, resizable: Option<bool>) -> Self
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
Sourcepub const fn transparent(self, transparent: Option<bool>) -> Self
pub const fn transparent(self, transparent: Option<bool>) -> Self
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
Sourcepub const fn decorations(self, decorations: Option<bool>) -> Self
pub const fn decorations(self, decorations: Option<bool>) -> Self
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
Sourcepub fn icon(self, icon: Option<Arc<IconData>>) -> Self
pub fn icon(self, icon: Option<Arc<IconData>>) -> Self
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
Sourcepub fn active(self, active: Option<bool>) -> Self
pub fn active(self, active: Option<bool>) -> Self
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
Sourcepub fn visible(self, visible: Option<bool>) -> Self
pub fn visible(self, visible: Option<bool>) -> Self
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
Sourcepub fn fullsize_content_view(self, fullsize_content_view: Option<bool>) -> Self
pub fn fullsize_content_view(self, fullsize_content_view: Option<bool>) -> Self
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
Sourcepub fn movable_by_window_background(
self,
movable_by_window_background: Option<bool>,
) -> Self
pub fn movable_by_window_background( self, movable_by_window_background: Option<bool>, ) -> Self
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
Sourcepub fn title_shown(self, title_shown: Option<bool>) -> Self
pub fn title_shown(self, title_shown: Option<bool>) -> Self
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
Sourcepub fn titlebar_shown(self, titlebar_shown: Option<bool>) -> Self
pub fn titlebar_shown(self, titlebar_shown: Option<bool>) -> Self
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
Sourcepub fn has_shadow(self, has_shadow: Option<bool>) -> Self
pub fn has_shadow(self, has_shadow: Option<bool>) -> Self
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
Sourcepub fn drag_and_drop(self, drag_and_drop: Option<bool>) -> Self
pub fn drag_and_drop(self, drag_and_drop: Option<bool>) -> Self
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
Sourcepub fn taskbar(self, taskbar: Option<bool>) -> Self
pub fn taskbar(self, taskbar: Option<bool>) -> Self
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
Sourcepub const fn window_level(self, window_level: Option<WindowLevel>) -> Self
pub const fn window_level(self, window_level: Option<WindowLevel>) -> Self
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
Sourcepub const fn mouse_passthrough(self, mouse_passthrough: Option<bool>) -> Self
pub const fn mouse_passthrough(self, mouse_passthrough: Option<bool>) -> Self
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
Sourcepub const fn window_type(self, window_type: Option<X11WindowType>) -> Self
pub const fn window_type(self, window_type: Option<X11WindowType>) -> Self
See egui::viewport::ViewportBuilder. This is a convenience function that sets the field.
Sourcepub const fn allow_raster_opt(self, allow_raster_opt: bool) -> Self
pub const fn allow_raster_opt(self, allow_raster_opt: bool) -> Self
If false: Rasterize everything with triangles, always calculate vertex colors, uvs, use bilinear
everywhere, etc… Things should look the same with this set to true while rendering faster.
Default is true!
Sourcepub const fn convert_tris_to_rects(self, convert_tris_to_rects: bool) -> Self
pub const fn convert_tris_to_rects(self, convert_tris_to_rects: bool) -> Self
If true: attempts to optimize by converting suitable triangle pairs into rectangles for faster rendering.
Things should look the same with this set to true while rendering faster.
Default is true!
Sourcepub const fn caching(self, caching: bool) -> Self
pub const fn caching(self, caching: bool) -> Self
If true: rasterized ClippedPrimitives are cached and rendered to an intermediate tiled canvas. That canvas is then rendered over the frame buffer. If false ClippedPrimitives are rendered directly to the frame buffer. Rendering without caching is much slower and primarily intended for testing.
Default is true!
Trait Implementations§
Source§impl Clone for SoftwareBackendAppConfiguration
impl Clone for SoftwareBackendAppConfiguration
Source§fn clone(&self) -> SoftwareBackendAppConfiguration
fn clone(&self) -> SoftwareBackendAppConfiguration
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for SoftwareBackendAppConfiguration
impl RefUnwindSafe for SoftwareBackendAppConfiguration
impl Send for SoftwareBackendAppConfiguration
impl Sync for SoftwareBackendAppConfiguration
impl Unpin for SoftwareBackendAppConfiguration
impl UnsafeUnpin for SoftwareBackendAppConfiguration
impl UnwindSafe for SoftwareBackendAppConfiguration
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.