Decouple Mesh primitives from main Primitive type
This commit is contained in:
parent
2128472c2a
commit
fa5650cfd1
15 changed files with 248 additions and 205 deletions
|
|
@ -1,6 +1,6 @@
|
|||
//! A collection of triangle primitives.
|
||||
use crate::core::{Point, Rectangle};
|
||||
use crate::graphics::primitive;
|
||||
use crate::graphics::mesh;
|
||||
|
||||
/// A mesh of triangles.
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
|
|
@ -11,7 +11,7 @@ pub enum Mesh<'a> {
|
|||
origin: Point,
|
||||
|
||||
/// The vertex and index buffers of the [`Mesh`].
|
||||
buffers: &'a primitive::Mesh2D<primitive::ColoredVertex2D>,
|
||||
buffers: &'a mesh::Indexed<mesh::SolidVertex2D>,
|
||||
|
||||
/// The clipping bounds of the [`Mesh`].
|
||||
clip_bounds: Rectangle<f32>,
|
||||
|
|
@ -22,7 +22,7 @@ pub enum Mesh<'a> {
|
|||
origin: Point,
|
||||
|
||||
/// The vertex and index buffers of the [`Mesh`].
|
||||
buffers: &'a primitive::Mesh2D<primitive::GradientVertex2D>,
|
||||
buffers: &'a mesh::Indexed<mesh::GradientVertex2D>,
|
||||
|
||||
/// The clipping bounds of the [`Mesh`].
|
||||
clip_bounds: Rectangle<f32>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue