Struct nuance::Globals[][src]

pub struct Globals {
    pub resolution: Vector2<u32>,
    pub mouse: Vector2<u32>,
    pub mouse_wheel: f32,
    pub ratio: f32,
    pub time: f32,
    pub frame: u32,
}
Expand description

The globals we pass to the fragment shader

Fields

resolution: Vector2<u32>

Window resolution

mouse: Vector2<u32>

Mouse pos

mouse_wheel: f32

Mouse wheel

ratio: f32

Draw area width/height ratio

time: f32

Current running time in sec

frame: u32

Number of frame

Implementations

Trait Implementations

The std430 version of this value.

Convert this value into the std430 version of itself.

Converts from std430 version of self to self.

Returns the size of the std430 version of this type. Useful for pre-sizing buffers. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Writes this value into the given Writer using std430 layout rules. Read more

The space required to write this value using std430 layout rules. This does not include alignment padding that may be needed before or after this type when written as part of a larger buffer. Read more