summaryrefslogtreecommitdiffstats
path: root/graphics/src/triangle.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2023-03-09 19:05:38 +0100
committerLibravatar GitHub <noreply@github.com>2023-03-09 19:05:38 +0100
commitcaf2836b1b15bff6e8a2ea72441d67f297eb8707 (patch)
tree0ffa0d1d604780999892b88de85ee93e3ed7d539 /graphics/src/triangle.rs
parent11b2c3bbe31a43e73a61b9bd9f022233f302ae27 (diff)
parent424ac8177309440bbd8efe0dd9f7622cb10807ce (diff)
downloadiced-caf2836b1b15bff6e8a2ea72441d67f297eb8707.tar.gz
iced-caf2836b1b15bff6e8a2ea72441d67f297eb8707.tar.bz2
iced-caf2836b1b15bff6e8a2ea72441d67f297eb8707.zip
Merge pull request #1748 from iced-rs/feature/software-renderer
Software renderer, runtime renderer fallback, and core consolidation
Diffstat (limited to '')
-rw-r--r--graphics/src/triangle.rs32
1 files changed, 0 insertions, 32 deletions
diff --git a/graphics/src/triangle.rs b/graphics/src/triangle.rs
index f52b2339..09b61767 100644
--- a/graphics/src/triangle.rs
+++ b/graphics/src/triangle.rs
@@ -1,33 +1 @@
//! Draw geometry using meshes of triangles.
-use bytemuck::{Pod, Zeroable};
-
-/// A set of [`Vertex2D`] and indices representing a list of triangles.
-#[derive(Clone, Debug)]
-pub struct Mesh2D<T> {
- /// The vertices of the mesh
- pub vertices: Vec<T>,
-
- /// The list of vertex indices that defines the triangles of the mesh.
- ///
- /// Therefore, this list should always have a length that is a multiple of 3.
- pub indices: Vec<u32>,
-}
-
-/// A two-dimensional vertex.
-#[derive(Copy, Clone, Debug, Zeroable, Pod)]
-#[repr(C)]
-pub struct Vertex2D {
- /// The vertex position in 2D space.
- pub position: [f32; 2],
-}
-
-/// A two-dimensional vertex with a color.
-#[derive(Copy, Clone, Debug, Zeroable, Pod)]
-#[repr(C)]
-pub struct ColoredVertex2D {
- /// The vertex position in 2D space.
- pub position: [f32; 2],
-
- /// The color of the vertex in __linear__ RGBA.
- pub color: [f32; 4],
-}