- Move engine to a different crate - Add engine trait - Refactor the rest of the codebase to work with these changes - Add debug ui buffer, use it to finish imgui support
15 lines
554 B
Rust
15 lines
554 B
Rust
use std::cell::RefCell;
|
|
use std::rc::Rc;
|
|
use crate::context::PlatformContext;
|
|
use crate::DebugUIBuffer;
|
|
use crate::scene::Scene;
|
|
|
|
pub trait EngineTrait {
|
|
fn new() -> Self;
|
|
fn initialize(&mut self, platform_context: PlatformContext);
|
|
fn update(&mut self, platform_context: PlatformContext);
|
|
fn current_scene_mut(&mut self) -> &mut Scene;
|
|
fn get_debug_ui_buffer(&self) -> Rc<RefCell<DebugUIBuffer>>;
|
|
fn reset_debug_ui_buffer(&mut self);
|
|
fn scene_and_debug_ui_buffer_mut(&mut self) -> (&mut Scene, Rc<RefCell<DebugUIBuffer>>);
|
|
}
|