vulkano_test/src/core/scene/mod.rs

19 lines
544 B
Rust

use std::error::Error;
use vulkano::sync::GpuFuture;
use crate::core::app::context::WindowContext;
pub mod manager;
pub trait Scene {
fn loaded(&self) -> bool;
fn load(&mut self, app_context: &mut WindowContext) -> Result<(), Box<dyn Error>>;
fn update(&mut self, app_context: &mut WindowContext) -> Result<(), Box<dyn Error>>;
fn render(
&mut self,
acquire_future: Box<dyn GpuFuture>,
app_context: &mut WindowContext,
) -> Result<Box<dyn GpuFuture>, Box<dyn Error>>;
fn unload(&mut self);
}