nCine::RHI::RDP::QuadRecord struct

One quad of any size, with its own colour and optionally turned, in the packed form the RDP dispatch reads.

The particles of a level (see Jazz2::Tiles::TileMap::DestructibleDebris) are drawn as a mesh of these with PrimitiveType::Points, 32 bytes each instead of 128 bytes of vertices and indices. Flags of every record carry IsQuad, which tells the mesh from one of TileRecord.

The quad covers TexW x TexH texels, from the corner at (X, Y) along the edge (Ex, Ey) and FLen far perpendicular to it (a quarter turn clockwise, Y down). An edge with no vertical part is an upright quad, drawn as a rectangle, a turned one takes two triangles.

Public static variables

static std::uint8_t IsQuad constexpr
Marks a record as a quad, see Flags.
static std::int32_t EdgeScale constexpr
Steps per pixel of Ex, Ey and FLen.
static std::int32_t TexelScale constexpr
Steps per texel of TexW and TexH.

Public variables

float X
Corner the texture rectangle starts at, in the space the command's transformation maps.
float Y
std::uint16_t TexX
Top-left texel of the texture rectangle.
std::uint16_t TexY
std::uint8_t Alpha
Alpha of the quad (it modulates the colour of the mesh).
std::uint8_t Flags
Always IsQuad, at the offset of TileRecord::Flags.
std::uint16_t FLen
Length of the edge along the vertical axis of the texture, in 1 / EdgeScale of a pixel.
std::int16_t Ex
Edge along the horizontal axis of the texture, in 1 / EdgeScale of a pixel.
std::int16_t Ey
std::uint16_t TexW
Size of the texture rectangle, in 1 / TexelScale of a texel.
std::uint16_t TexH
std::uint8_t TintR
Colour of the quad (it modulates the colour of the mesh).
std::uint8_t TintG
std::uint8_t TintB
std::uint8_t Reserved