app: Move render_pass into scene
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 8m8s
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 8m8s
This commit is contained in:
parent
131811a539
commit
f835941432
7 changed files with 250 additions and 267 deletions
24
src/core/scene/mod.rs
Normal file
24
src/core/scene/mod.rs
Normal file
|
@ -0,0 +1,24 @@
|
|||
use std::{error::Error, sync::Arc};
|
||||
|
||||
use egui_winit_vulkano::Gui;
|
||||
use vulkano::{image::view::ImageView, sync::GpuFuture};
|
||||
|
||||
mod context;
|
||||
pub use context::SceneContext;
|
||||
|
||||
mod manager;
|
||||
pub use manager::SceneManager;
|
||||
|
||||
pub trait Scene {
|
||||
fn loaded(&self) -> bool;
|
||||
fn load(&mut self, scene_context: &SceneContext);
|
||||
fn update(&mut self, scene_context: &SceneContext);
|
||||
fn render(
|
||||
&mut self,
|
||||
image_view: &Arc<ImageView>,
|
||||
acquire_future: Box<dyn GpuFuture>,
|
||||
scene_context: &SceneContext,
|
||||
gui: &mut Gui,
|
||||
) -> Result<Box<dyn GpuFuture>, Box<dyn Error>>;
|
||||
fn unload(&mut self);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue