Skip to content

chickenbreeder/kaffee

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kaffee

Docs crates.io

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).

Example

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();
}

Goals

  • Good documentation and examples
  • Provide an easy to use API
  • Support a wide range of platforms
  • Decent performance

License

Apache License, Version 2.0

About

A graphics API built on top of wgpu-rs

Resources

License

Stars

Watchers

Forks