[−][src]Struct simple_game_engine::Engine
The main game engine, which manages the display and input.
Implementations
impl<'a> Engine<'a>[src]
pub fn new(
app: &'a mut dyn Application,
title: &'a str,
width: u32,
height: u32
) -> Result<Engine<'a>, Box<dyn Error>>[src]
app: &'a mut dyn Application,
title: &'a str,
width: u32,
height: u32
) -> Result<Engine<'a>, Box<dyn Error>>
Create a new engine.
Parameters
app: Defines the application's logic.title: Title of the window.width: Width (in pixels) of the window.height: Height (in pixels) of the window.
pub fn start(&mut self, present_vsync: bool) -> Result<(), Box<dyn Error>>[src]
Create and show the window and start the main event loop.
Parameters
present_vsync: Whether to limit the frame rate of the application to the frame rate of the display.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Engine<'a>[src]
impl<'a> !Send for Engine<'a>[src]
impl<'a> !Sync for Engine<'a>[src]
impl<'a> Unpin for Engine<'a>[src]
impl<'a> !UnwindSafe for Engine<'a>[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,