Struct crayon::application::Engine
[−]
[src]
pub struct Engine { pub events_loop: EventsLoop, pub input: InputSystem, pub window: Arc<Window>, pub graphics: GraphicsSystem, pub resource: ResourceSystem, pub time: TimeSystem, // some fields omitted }
Engine
is the root object of the game application. It binds various sub-systems in
a central place and takes take of trivial tasks like the execution order or life-time
management.
Fields
events_loop: EventsLoop
input: InputSystem
window: Arc<Window>
graphics: GraphicsSystem
resource: ResourceSystem
time: TimeSystem
Methods
impl Engine
[src]
fn new() -> Result<Self>
[src]
Constructs a new, empty engine.
fn new_with(settings: Settings) -> Result<Self>
[src]
Setup engine with specified settings.
fn context(&self) -> &Context
[src]
fn run<T>(self, application: T) -> Result<Self> where
T: Application + Send + Sync + 'static,
[src]
T: Application + Send + Sync + 'static,
Run the main loop of Engine
, this will block the working
thread until we finished.