diff options
author | 2023-11-28 23:13:38 +0100 | |
---|---|---|
committer | 2023-11-28 23:13:38 +0100 | |
commit | ab7dae554cac801aeed5d9aa4d3850d50be86263 (patch) | |
tree | 4165df808d50fbaa4cb9b27ded59077b769a4135 /wgpu/src/layer | |
parent | 100d15f30654d446cffe2fb60a435c79c81b0188 (diff) | |
download | iced-ab7dae554cac801aeed5d9aa4d3850d50be86263.tar.gz iced-ab7dae554cac801aeed5d9aa4d3850d50be86263.tar.bz2 iced-ab7dae554cac801aeed5d9aa4d3850d50be86263.zip |
Provide actual bounds to `Shader` primitives
... and allow for proper translation and scissoring.
Diffstat (limited to 'wgpu/src/layer')
-rw-r--r-- | wgpu/src/layer/pipeline.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/wgpu/src/layer/pipeline.rs b/wgpu/src/layer/pipeline.rs new file mode 100644 index 00000000..6dfe6750 --- /dev/null +++ b/wgpu/src/layer/pipeline.rs @@ -0,0 +1,17 @@ +use crate::core::Rectangle; +use crate::primitive::pipeline::Primitive; + +use std::sync::Arc; + +#[derive(Clone, Debug)] +/// A custom primitive which can be used to render primitives associated with a custom pipeline. +pub struct Pipeline { + /// The bounds of the [`Pipeline`]. + pub bounds: Rectangle, + + /// The viewport of the [`Pipeline`]. + pub viewport: Rectangle, + + /// The [`Primitive`] to render. + pub primitive: Arc<dyn Primitive>, +} |