Struct screen_13::EventLoopBuilder
source · [−]pub struct EventLoopBuilder { /* private fields */ }Expand description
Builder for EventLoop.
Implementations
sourceimpl EventLoopBuilder
impl EventLoopBuilder
sourcepub fn available_monitors(&self) -> impl Iterator<Item = MonitorHandle>
pub fn available_monitors(&self) -> impl Iterator<Item = MonitorHandle>
Returns the list of all the monitors available on the system.
sourcepub fn configure<ConfigureFn>(self, configure_fn: ConfigureFn) -> Selfwhere
ConfigureFn: FnOnce(DriverConfigBuilder) -> DriverConfigBuilder,
pub fn configure<ConfigureFn>(self, configure_fn: ConfigureFn) -> Selfwhere
ConfigureFn: FnOnce(DriverConfigBuilder) -> DriverConfigBuilder,
Provides a closure which configures the DriverConfig instance.
sourcepub fn desired_swapchain_image_count(
self,
desired_swapchain_image_count: u32
) -> Self
pub fn desired_swapchain_image_count(
self,
desired_swapchain_image_count: u32
) -> Self
A request to the driver to use a certain number of swapchain images.
More images introduces more display lag, but smoother animation.
sourcepub fn sync_display(self, sync_display: bool) -> Self
pub fn sync_display(self, sync_display: bool) -> Self
Set to true to enable vsync in exclusive fullscreen video modes.
sourcepub fn fullscreen_mode(self, mode: FullscreenMode) -> Self
pub fn fullscreen_mode(self, mode: FullscreenMode) -> Self
Sets up fullscreen mode using a conveience function. There are
additional options offered by winit which can be accessed using
the with function.
sourcepub fn debug(self, debug: bool) -> Self
pub fn debug(self, debug: bool) -> Self
Enables Vulkan graphics debugging layers.
NOTE: Any valdation warnings or errors will cause the current thread to park itself after
describing the error using the log crate. This makes it easy to attach a debugger and see
what is causing the issue directly.
sourcepub fn primary_monitor(&self) -> Option<MonitorHandle>
pub fn primary_monitor(&self) -> Option<MonitorHandle>
Returns the primary monitor of the system.
Returns None if it can’t identify any monitor as a primary one.
Platform-specific
Wayland: Always returns None.
sourcepub fn ray_tracing(self, ray_tracing: bool) -> Self
pub fn ray_tracing(self, ray_tracing: bool) -> Self
Pass true to this method to enable hardware ray tracing, if supported.
sourcepub fn resolver_pool(self, pool: Box<dyn ResolverPool>) -> Self
pub fn resolver_pool(self, pool: Box<dyn ResolverPool>) -> Self
Allows for specification of a custom pool implementation.
This pool will hold leases for Vulkan objects needed by Display.
sourcepub fn window<WindowFn>(self, window_fn: WindowFn) -> Selfwhere
WindowFn: FnOnce(WindowBuilder) -> WindowBuilder,
pub fn window<WindowFn>(self, window_fn: WindowFn) -> Selfwhere
WindowFn: FnOnce(WindowBuilder) -> WindowBuilder,
Allows deeper customization of the window, if needed.
sourcepub fn window_mode(self) -> Self
pub fn window_mode(self) -> Self
Sets up “windowed” mode, which is the opposite of fullscreen.
sourceimpl EventLoopBuilder
impl EventLoopBuilder
sourcepub fn build(self) -> Result<EventLoop, DriverError>
pub fn build(self) -> Result<EventLoop, DriverError>
Builds a new EventLoop.