app: refactor WindowContext name and creation
This commit is contained in:
parent
a293b962f7
commit
45ccf030f6
6 changed files with 42 additions and 52 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue