diff options
author | 2023-11-14 20:59:49 +0100 | |
---|---|---|
committer | 2023-11-14 20:59:49 +0100 | |
commit | b474a2b7a763dcde6a377cb409001a7b5285ee8d (patch) | |
tree | 6e751607bb103e7011807a45797923d86214d88d /wgpu/src/primitive.rs | |
parent | 817f72868746461891ca4e74473c555f3b5c5703 (diff) | |
parent | 0968c5b64a528ff92a5a93f6586eef557546da25 (diff) | |
download | iced-b474a2b7a763dcde6a377cb409001a7b5285ee8d.tar.gz iced-b474a2b7a763dcde6a377cb409001a7b5285ee8d.tar.bz2 iced-b474a2b7a763dcde6a377cb409001a7b5285ee8d.zip |
Merge pull request #2085 from bungoboingo/shader-widget
[Feature] Custom Shader Widget
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, } } } |