GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::graphics::Viewport Class Reference

Region of a render target. More...

#include <GREM/graphics/Viewport.hpp>

Public Member Functions

bool operator== (const Viewport &other) const =default
 Compare this viewport to another for equality.

Public Attributes

Region2D region {.size{1, 1}}
 Rectangular region of the viewport in the render target, in pixels.
float minDepth = 0.0f
 Minimum depth value in the depth range of the viewport.
float maxDepth = 1.0f
 Maximum depth value in the depth range of the viewport.
Optional< Region2D > scissor {}
 Optional rectangular scissor region, outside of which any attempts to render a pixel will be discarded.

Detailed Description

Region of a render target.

Member Function Documentation

◆ operator==()

bool grem::graphics::Viewport::operator== ( const Viewport & other) const
nodiscarddefault

Compare this viewport to another for equality.

Parameters
otherthe viewport to compare this viewport to.
Returns
true if the viewports are equal, false otherwise.

Member Data Documentation

◆ region

Region2D grem::graphics::Viewport::region {.size{1, 1}}

Rectangular region of the viewport in the render target, in pixels.

◆ minDepth

float grem::graphics::Viewport::minDepth = 0.0f

Minimum depth value in the depth range of the viewport.

Must be between 0 and 1 (inclusive).

◆ maxDepth

float grem::graphics::Viewport::maxDepth = 1.0f

Maximum depth value in the depth range of the viewport.

Must be between 0 and 1 (inclusive).

◆ scissor

Optional<Region2D> grem::graphics::Viewport::scissor {}

Optional rectangular scissor region, outside of which any attempts to render a pixel will be discarded.


The documentation for this class was generated from the following file: