Skip to main content

pebble/ecs/
system.rs

1/// When a system runs, each tick. Stages run in the order listed here.
2#[derive(Copy, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
3pub enum SystemStage {
4    /// Once, before anything else — no GPU backend yet, pure CPU setup.
5    Startup,
6    /// Once, automatically, the first tick the GPU backend is ready. For
7    /// one-time setup that needs `Backend`/`Assets<T>` — a plain
8    /// `Read<Backend>` here is always safe, no `Option` guard needed.
9    Ready,
10    /// Uploads CPU-side assets to the GPU, retrying until dependencies are met.
11    AssetSync,
12    /// Before main game logic (input, timers, event aging).
13    PreUpdate,
14    /// Main game logic.
15    Update,
16    /// After main game logic.
17    PostUpdate,
18    /// Acquire the frame.
19    PreRender,
20    /// Issue draw calls.
21    Render,
22    /// Submit and present.
23    PostRender,
24}