[][src]Struct grr::Viewport

pub struct Viewport {
    pub x: f32,
    pub y: f32,
    pub w: f32,
    pub h: f32,
    pub n: f64,
    pub f: f64,
}

Viewport transformation.

Viewport transformation is part of the fixed-function Vertex Post-Processing pipeline. The returning vertex positions (GLSL: gl_Position) in clip space are transformed to normalized device coordinates (NDC) by perspective division. Viewport transformation further converts the NDC into framebuffer coordinates.

During the geometry a primitive will be assigned a viewport index (GLSL: gl_ViewportIndex) either automatically or manually. This index controls which viewport from the bounded viewports will be selected for applying the transformation for the current primitive.

Fields

x: f32

Offset (x).

y: f32

Offset (y).

w: f32

Width.

h: f32

Height.

n: f64f: f64

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.