Provide actual bounds to Shader primitives
... and allow for proper translation and scissoring.
This commit is contained in:
parent
100d15f306
commit
ab7dae554c
8 changed files with 54 additions and 40 deletions
17
wgpu/src/layer/pipeline.rs
Normal file
17
wgpu/src/layer/pipeline.rs
Normal 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>,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue