33 lines
618 B
Rust
33 lines
618 B
Rust
mod landed;
|
|
mod system;
|
|
|
|
use std::fmt::Debug;
|
|
|
|
pub use landed::LandedScene;
|
|
pub use system::SystemScene;
|
|
|
|
use crate::{GPUState, RenderInput};
|
|
use anyhow::Result;
|
|
|
|
pub trait RenderScene {
|
|
fn render(g: &mut GPUState, input: &RenderInput) -> Result<()>;
|
|
}
|
|
|
|
/// What render routine to run
|
|
pub enum RenderScenes {
|
|
/// Draw the system we're in
|
|
System,
|
|
|
|
/// Draw the landed UI
|
|
Landed,
|
|
}
|
|
|
|
impl Debug for RenderScenes {
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
match self {
|
|
Self::Landed => write!(f, "RenderScenes::Landed"),
|
|
Self::System => write!(f, "RenderScenes::System"),
|
|
}
|
|
}
|
|
}
|