pub struct Viewport<'a, T> {
pub x: f32,
pub y: f32,
pub mvp: Option<&'a [f32; 16]>,
pub output: T,
pub size: Size<u32>,
}Expand description
The rendering output of a filter chain.
Viewport coordinates are relative to the coordinate system of the
target runtime. For correct results, x and y should almost always be
0, and size should be the same as the size of the output texture.
Size uniforms will always be passed the full size of the output texture, regardless of the user-specified viewport size.
Fields§
§x: f32The x offset to start rendering from. For correct results, this should almost always be 0 to indicate the origin.
y: f32The y offset to begin rendering from.
mvp: Option<&'a [f32; 16]>An optional pointer to an MVP to use when rendering to the viewport.
output: TThe output handle to render the final image to.
size: Size<u32>The extent of the viewport size starting from the origin defined by x and y.
Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for Viewport<'a, T>where
T: Freeze,
impl<'a, T> RefUnwindSafe for Viewport<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for Viewport<'a, T>where
T: Send,
impl<'a, T> Sync for Viewport<'a, T>where
T: Sync,
impl<'a, T> Unpin for Viewport<'a, T>where
T: Unpin,
impl<'a, T> UnwindSafe for Viewport<'a, T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more