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§

pub use winit;

Modules§

builder
Structs for Building Shapes
draw
info
painter
Structs for Drawing Shapes
settings
vertex

Enums§

EventResult
Result for the event function

Traits§

App
Main Application trait
handles rendering, inputs and updates