pub struct StrataApp {
pub runtime: AppRuntime,
pub window_config: WindowConfig,
pub hooks: AppLifecycleHooks,
pub compositor: SwapchainCompositor,
pub presenter: SoftwareSurfacePresenter,
}Expand description
Low-level application orchestrator with fine-grained control over windowing, swapchain presentation, lifecycle hooks, and manual frame pacing.
Fields§
§runtime: AppRuntime§window_config: WindowConfig§hooks: AppLifecycleHooks§compositor: SwapchainCompositor§presenter: SoftwareSurfacePresenterImplementations§
Source§impl StrataApp
impl StrataApp
Sourcepub fn builder() -> StrataAppBuilder
pub fn builder() -> StrataAppBuilder
Creates a fluent low-level builder for configuring and launching a Strata app.
Sourcepub fn step_frame(&mut self) -> &DisplayList
pub fn step_frame(&mut self) -> &DisplayList
Advances the runtime by a single frame and returns the generated display commands.
Sourcepub fn dispatch_event(&mut self, event: &PlatformEvent) -> bool
pub fn dispatch_event(&mut self, event: &PlatformEvent) -> bool
Dispatches a platform event into the runtime and lifecycle hooks.
Sourcepub fn render_to_buffer(&mut self) -> Result<&[u8], PresentError>
pub fn render_to_buffer(&mut self) -> Result<&[u8], PresentError>
Renders current frame to internal software surface buffer and returns immutable slice of BGRA pixels.
Sourcepub fn run_headless(&mut self, frame_count: u64) -> Vec<AppFrameInfo>
pub fn run_headless(&mut self, frame_count: u64) -> Vec<AppFrameInfo>
Runs the application headlessly for a specified number of frames.
Sourcepub fn run_with_event_loop<E: EventLoop>(self, event_loop: &mut E)
pub fn run_with_event_loop<E: EventLoop>(self, event_loop: &mut E)
Runs the platform window event loop with surface presentation.
Auto Trait Implementations§
impl !Freeze for StrataApp
impl !RefUnwindSafe for StrataApp
impl !Send for StrataApp
impl !Sync for StrataApp
impl !UnwindSafe for StrataApp
impl Forget for StrataApp
impl Move for StrataApp
impl Unpin for StrataApp
impl UnsafeUnpin for StrataApp
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