This is an attempt at designing a simple 2D graphics framework on top of wgpu, inspired by macroquad. You should probably not use this (yet).
See: examples/hello.rs
use kaffee::prelude::*;
struct GameState;
impl EventHandler for GameState {
fn init(&mut self, _: &mut GfxContext) -> Result<(), ErrorKind> {
Ok(())
}
fn input(&mut self, _: InputEvent) {}
fn update(&mut self, _: f32) {}
fn redraw(&mut self, g: &mut GfxContext) {
g.clear_color(Color::BLACK);
g.draw_quad(100., 100., 200., Color::RED);
}
}
fn main() {
pollster::block_on(App::new(GameState {})).run();
}
- Good documentation and examples
- Provide an easy to use API
- Support a wide range of platforms
- Decent performance
Apache License, Version 2.0