librashader/librashader-common/src/viewport.rs

18 lines
531 B
Rust
Raw Normal View History

use crate::Size;
2023-01-13 18:54:16 +11:00
/// The rendering output of a filter chain.
pub struct Viewport<'a, T> {
/// The x offset to start rendering from.
pub x: f32,
/// The y offset to begin rendering from.
pub y: f32,
/// An optional pointer to an MVP to use when rendering
/// to the viewport.
pub mvp: Option<&'a [f32; 16]>,
/// The output handle to render the final image to.
pub output: T,
/// The extent of the viewport size starting from the origin defined
/// by x and y.
pub size: Size<u32>,
2023-01-15 19:06:09 +11:00
}