Skip to main content

StrataApp

Struct StrataApp 

Source
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: SoftwareSurfacePresenter

Implementations§

Source§

impl StrataApp

Source

pub fn builder() -> StrataAppBuilder

Creates a fluent low-level builder for configuring and launching a Strata app.

Source

pub fn step_frame(&mut self) -> &DisplayList

Advances the runtime by a single frame and returns the generated display commands.

Source

pub fn dispatch_event(&mut self, event: &PlatformEvent) -> bool

Dispatches a platform event into the runtime and lifecycle hooks.

Source

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.

Source

pub fn run_headless(&mut self, frame_count: u64) -> Vec<AppFrameInfo>

Runs the application headlessly for a specified number of frames.

Source

pub fn run_with_event_loop<E: EventLoop>(self, event_loop: &mut E)

Runs the platform window event loop with surface presentation.

Source

pub fn run(self)

Runs the application using the native platform window (Wayland/X11 on Linux, Win32 on Windows, Cocoa on macOS), or headless fallback when running headless.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>