app: refactor WindowContext name and creation

This commit is contained in:
Florian RICHER 2025-05-31 12:56:00 +02:00
parent a293b962f7
commit 45ccf030f6
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
6 changed files with 42 additions and 52 deletions

View file

@ -2,18 +2,18 @@ use std::error::Error;
use vulkano::sync::GpuFuture;
use crate::core::app::context::ApplicationContext;
use crate::core::app::context::WindowContext;
pub mod manager;
pub trait Scene {
fn loaded(&self) -> bool;
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 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 ApplicationContext,
app_context: &mut WindowContext,
) -> Result<Box<dyn GpuFuture>, Box<dyn Error>>;
fn unload(&mut self);
}