#wgpu #winit #graphics

ready-paint

A simple ready-paint schema using wgpu and winit

5 releases

new 0.2.1 Feb 15, 2025
0.2.0 Jan 22, 2025
0.1.2 Jan 15, 2025
0.1.1 Jan 13, 2025
0.1.0 Jan 13, 2025

#119 in Rendering

Download history 104/week @ 2025-01-07 227/week @ 2025-01-14 135/week @ 2025-01-21 2/week @ 2025-01-28 3/week @ 2025-02-04 124/week @ 2025-02-11

277 downloads per month

MIT license

26KB
450 lines

Ready-Paint

This is a simple abstract model of wgpu drawing.

Chinese: 这个库的代码和设计并非是最优的,只是一个简单的抽象模型,便于理解和书写从第一元素到实现的编码习惯模式。

English: The code and design of this library is not the best, it is just a simple abstract model, which is convenient for understanding and writing coding habits from the first element to the implementation.

How to use it

cargo run --example base
cargo run --example queue_ready_paint_pass
cargo run --example nice_view

Advance usage of the library.

In more complex logic processing, you can use this function when you need to use both immutable and mutable references in the same scope

cargo run --example refs_muts

Code View

pub struct NiceViewScene;
impl Queue for NiceViewScene {
    fn introduce(scene: &mut ready_paint::scene::Scene) {
        scene
            .add_ready(world::World::default())
            .add_ready(object::Tetrahedron::default());
        scene.add_paint::<PaintScene>();
    }
}

Changelog

Dependencies

~3–32MB
~460K SLoC