Provide actual bounds to Shader primitives

... and allow for proper translation and scissoring.
This commit is contained in:
Héctor Ramón Jiménez 2023-11-28 23:13:38 +01:00
parent 100d15f306
commit ab7dae554c
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
8 changed files with 54 additions and 40 deletions

View file

@ -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>,
}