Crates.io | easygpu-lyon |
lib.rs | easygpu-lyon |
version | 0.5.0 |
source | src |
created_at | 2020-10-09 16:00:35.473851 |
updated_at | 2023-04-28 14:57:12.269659 |
description | A 2d graphics pipeline for easygpu utilizing lyon |
homepage | |
repository | https://github.com/khonsulabs/easygpu-lyon |
max_upload_size | |
id | 297736 |
size | 78,386 |
This crate provides a vector shape rendering pipeline for easygpu via lyon.
let mut builder = ShapeBuilder::default();
lyon::tessellation::basic_shapes::fill_circle(
Point::new(50., 50.),
25.,
&FillOptions::default(),
&mut builder,
)
.expect("Error tesselating circle");
let shape = builder.prepare(&renderer);
// { ... }
pass.set_pipeline(&self.pipeline);
self.shape.draw(pass);
For a more in-depth look, check out the examples/ directory. You can run individual examples using cargo run --example <name>
, e.g., cargo run --example circle