summaryrefslogtreecommitdiffstats
path: root/wgpu/src/primitive.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-02-12 08:49:42 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-02-12 08:49:42 +0100
commit578ea4abb8a2dd0d53d7087322796bf9ad541b56 (patch)
treebe684d9262fbf1ae0c5fc2db469d74ab0a5a98c4 /wgpu/src/primitive.rs
parentf34407bfdaf06c4bf204dc31b152be9451c243b8 (diff)
downloadiced-578ea4abb8a2dd0d53d7087322796bf9ad541b56.tar.gz
iced-578ea4abb8a2dd0d53d7087322796bf9ad541b56.tar.bz2
iced-578ea4abb8a2dd0d53d7087322796bf9ad541b56.zip
Finish `clock` example
Diffstat (limited to '')
-rw-r--r--wgpu/src/primitive.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/wgpu/src/primitive.rs b/wgpu/src/primitive.rs
index 481252ef..823b4b72 100644
--- a/wgpu/src/primitive.rs
+++ b/wgpu/src/primitive.rs
@@ -1,5 +1,5 @@
use iced_native::{
- image, svg, Background, Color, Font, HorizontalAlignment, Rectangle,
+ image, svg, Background, Color, Font, HorizontalAlignment, Point, Rectangle,
Vector, VerticalAlignment,
};
@@ -73,7 +73,13 @@ pub enum Primitive {
/// A low-level primitive to render a mesh of triangles.
///
/// It can be used to render many kinds of geometry freely.
- Mesh2D(Arc<triangle::Mesh2D>),
+ Mesh2D {
+ /// The top-left coordinate of the mesh
+ origin: Point,
+
+ /// The vertex and index buffers of the mesh
+ buffers: Arc<triangle::Mesh2D>,
+ },
}
impl Default for Primitive {