tge 0.0.4

A lightweight cross-platform 2D game framework written in pure Rust and based on OpenGL 3.3+.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::error::GameResult;
use crate::engine::Engine;
use crate::event::Event;

pub trait Game {
    fn update(&mut self, engine: &mut Engine) -> GameResult;

    fn render(&mut self, engine: &mut Engine) -> GameResult;

    fn event(&mut self, _engine: &mut Engine, _event: Event) -> GameResult<bool> {
        Ok(false)
    }
}