Luna::RHI::Viewport

Describes one viewport used by ICommandBuffer::set_viewport and ICommandBuffer::set_viewports.

struct Luna::RHI::Viewport

Member objects

  • f32 top_left_x

    The X position, in pixels, of the top left corner of the viewport, relative to the top left corner of the render target (X axis points to right).

  • f32 top_left_y

    The Y position, in pixels, of the top left corner of the viewport, relative to the top left corner of the render target (Y axis points to down).

  • f32 width

    The width of the viewport in pixels.

  • f32 height

    The height of the viewport in pixels.

  • f32 min_depth

    The minimum depth value of the viewport. The value must between [0.0, 1.0].

  • f32 max_depth

    The maximum depth value of the viewport. The value must between [0.0, 1.0].