app: Move render_pass into scene
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 8m8s

This commit is contained in:
Florian RICHER 2025-05-29 00:17:21 +02:00
parent 131811a539
commit f835941432
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
7 changed files with 250 additions and 267 deletions

24
src/core/scene/mod.rs Normal file
View 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);
}