Refactor app context and render pass manager
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 9m10s
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 9m10s
This commit is contained in:
parent
f1ae54bc73
commit
2c169548b9
12 changed files with 846 additions and 466 deletions
|
@ -1,23 +1,19 @@
|
|||
use std::{error::Error, sync::Arc};
|
||||
use std::error::Error;
|
||||
|
||||
use egui_winit_vulkano::Gui;
|
||||
use vulkano::{image::view::ImageView, sync::GpuFuture};
|
||||
use vulkano::sync::GpuFuture;
|
||||
|
||||
mod context;
|
||||
pub use context::SceneContext;
|
||||
use crate::core::app::context::ApplicationContext;
|
||||
|
||||
mod manager;
|
||||
pub use manager::SceneManager;
|
||||
pub mod manager;
|
||||
|
||||
pub trait Scene {
|
||||
fn loaded(&self) -> bool;
|
||||
fn load(&mut self, scene_context: &SceneContext) -> Result<(), Box<dyn Error>>;
|
||||
fn update(&mut self, scene_context: &SceneContext) -> Result<(), Box<dyn Error>>;
|
||||
fn load(&mut self, app_context: &mut ApplicationContext) -> Result<(), Box<dyn Error>>;
|
||||
fn update(&mut self, app_context: &mut ApplicationContext) -> Result<(), Box<dyn Error>>;
|
||||
fn render(
|
||||
&mut self,
|
||||
acquire_future: Box<dyn GpuFuture>,
|
||||
scene_context: &SceneContext,
|
||||
gui: &mut Gui,
|
||||
app_context: &mut ApplicationContext,
|
||||
) -> Result<Box<dyn GpuFuture>, Box<dyn Error>>;
|
||||
fn unload(&mut self);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue