Crate wuple

source ·
Expand description

Simple, Performant rendering on WGPU

Example

use wuple::App;

pub struct Example {}
impl App for Example {
    fn render(&mut self, painter: &mut wuple::painter::Painter, builder: &mut wuple::builder::Builder, _info: &wuple::info::Info) {
        // Draw a Rectangle
        painter.draw(builder.rect(
            (-0.5, -0.5), (0.5, 0.5),
            wuple::builder::Draw::Color(wuple::painter::color::WHITE)
        ));
    }

    fn event(&mut self, event: &winit::event::WindowEvent) -> bool {
        // Handle Event
        false
    }

    fn update(&mut self, _info: &wuple::info::Info) {
        // Do some Updates before Rendering
    }
}

Example {}.run(true);

Re-exports

Modules

Enums

Traits

  • Main Application trait
    handles rendering, inputs and updates