pub enum SystemStage {
Startup,
PreUpdate,
Update,
PostUpdate,
PreRender,
AssetSync,
AssetSyncDeps,
Render,
PostRender,
}Expand description
Determines when during a frame a system is executed.
Stages are iterated in the order defined here — Startup
runs once during App::build, all others run every App::update tick.
Asset sync stages (AssetSync,
AssetSyncDeps) run after PreRender
so that the GPU backend — which is delivered in PreRender via a one-shot
channel — is guaranteed to be present before asset upload is attempted.
Variants§
Startup
Runs once at startup, before the main loop begins.
PreUpdate
Runs before the main update.
Update
Main game-logic update.
PostUpdate
Runs after the main update.
PreRender
Prepare rendering data and poll for the GPU backend. The backend resource becomes available here on the tick it finishes initialising, making it visible to the asset sync stages below.
AssetSync
Upload CPU-side source assets to the GPU backend.
Runs after PreRender so the backend is
guaranteed to be present.
AssetSyncDeps
Construct lazy GPU resources and upload assets that depend on other processed assets. Runs in a convergence loop so dependency chains (e.g. LazyResource A → LazyResource B) resolve within a single tick.
Render
Issue draw calls.
PostRender
Cleanup or post-processing after rendering.
Implementations§
Source§impl SystemStage
impl SystemStage
Sourcepub fn is_convergent(self) -> bool
pub fn is_convergent(self) -> bool
Returns true for stages that are re-run until no new resources are
inserted — collapsing multi-tick dependency chains into one tick.
Startup is included so a deferred or async resource producer (e.g. a
background thread pool result, or a LazyResource-style
startup system using Option<Res<T>> to wait) gets another pass
within the same build() call rather than only running once.
Trait Implementations§
Source§impl Clone for SystemStage
impl Clone for SystemStage
Source§fn clone(&self) -> SystemStage
fn clone(&self) -> SystemStage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SystemStage
Source§impl Debug for SystemStage
impl Debug for SystemStage
impl Eq for SystemStage
Source§impl Hash for SystemStage
impl Hash for SystemStage
Source§impl Ord for SystemStage
impl Ord for SystemStage
Source§fn cmp(&self, other: &SystemStage) -> Ordering
fn cmp(&self, other: &SystemStage) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for SystemStage
impl PartialEq for SystemStage
Source§impl PartialOrd for SystemStage
impl PartialOrd for SystemStage
impl StructuralPartialEq for SystemStage
Auto Trait Implementations§
impl Freeze for SystemStage
impl RefUnwindSafe for SystemStage
impl Send for SystemStage
impl Sync for SystemStage
impl Unpin for SystemStage
impl UnsafeUnpin for SystemStage
impl UnwindSafe for SystemStage
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> Component for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.