diff options
Diffstat (limited to 'wgpu/src/primitive.rs')
-rw-r--r-- | wgpu/src/primitive.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/wgpu/src/primitive.rs b/wgpu/src/primitive.rs index 8dbf3008..fff927ea 100644 --- a/wgpu/src/primitive.rs +++ b/wgpu/src/primitive.rs @@ -1,7 +1,13 @@ //! Draw using different graphical primitives. +pub mod pipeline; + +pub use pipeline::Pipeline; + use crate::core::Rectangle; use crate::graphics::{Damage, Mesh}; +use std::fmt::Debug; + /// The graphical primitives supported by `iced_wgpu`. pub type Primitive = crate::graphics::Primitive<Custom>; @@ -10,12 +16,15 @@ pub type Primitive = crate::graphics::Primitive<Custom>; pub enum Custom { /// A mesh primitive. Mesh(Mesh), + /// A custom pipeline primitive. + Pipeline(Pipeline), } impl Damage for Custom { fn bounds(&self) -> Rectangle { match self { Self::Mesh(mesh) => mesh.bounds(), + Self::Pipeline(pipeline) => pipeline.bounds, } } } |