mod viewport

Structs and Unions

A viewport, which holds all uniform buffers unique to a viewport, such as the ViewportProjection-spec.

Will bind to group 1.

Implementations

Functions

Binds this Viewport to group 1

The bind group layout for this Viewport

Creates a new viewport. Allocates uniform buffers in a bind group.

Updates this Viewport

The specs/data of a viewport

Will map coordinates from source into target

Can be converted into a projection-matrix using Into<Mat4>.

Implementations

Functions

An identity-ViewportProjection. Transforms nothing and fills the whole viewport.

The source-coordinates of the viewport. Will be from (x, y) in the top-left to (width, height) in the bottom-right.

Implementations

Functions

The bottom edge (maximum y) of this ViewportSource

Creates a ViewportSource from a given start-point and size.

Creates a ViewportSource from a given top-left and bottom-right point

The left edge (minimum x) of this ViewportSource

The right edge (maximum x) of this ViewportSource

The top edge (minimum y) of this ViewportSource

The target coordinates of the viewport. Coordinates are in wgpu coordinate-space.

Traits implemented