Dunge
Simple and portable 3d render based on WGPU.
## Features
* Simple and flexible API
* Customizable vertices, groups and instances
* Shader code described as a single rust function
* High degree of typesafety with minimal runtime checks
* Desktop, WASM and (later) Android support
* Optional built-in window and event loop
## Application area
Currently the library is for personal use only. Although, over time I plan to stabilize API so that someone could use it for their tasks.
## Getting Started
To start using the library add it to your project:
```sh
cargo add dunge -F winit
```
Specify the `winit` feature if you need to create a windowed application. Although this is not necessary, for example, you can simply draw a scene directly to the image in RAM.
So what if you want to draw something on the screen? Let's say you want to draw a simple colored triangle. Then start by creating a vertex type. To do this, derive the `Vertex` trait for your struct:
```rust
use dunge::prelude::*;
// Create a vertex type
#[repr(C)]
#[derive(Vertex)]
struct Vert {
pos: [f32; 2],
col: [f32; 3],
}
```
To render something on GPU you need to program a shader. In dunge you can do this via a normal (almost) rust function:
```rust
// Create a shader program
let triangle = |vert: sl::InVertex