nCine::RHI::PVR::TileRecord struct

One tile of a tile-layer mesh in the packed form the PVR dispatch reads.

A tile layer reaches the PVR backend as a mesh of the TileMapMesh effect. Drawn with PrimitiveType::Points, its vertex buffer holds one of these per tile instead of vertices: where the tile goes, and which texels of the atlas chunk it shows. At 16 bytes it is an eighth of the four 8-float corners a tile took before, plus the six indices they were addressed through - bytes the tile map wrote, the commit copied into the streaming buffer and the dispatch read back, for some thousand tiles a frame at 640x480. The dispatch synthesizes the corners itself, which also spares it resolving the indices and recognizing that two triangles form a quad.

Every tile is Size pixels and texels square, mapped 1:1 before the view's own scale. The mesh is produced only for this backend's tile layers (see TILEMAP_PACKED_TILE_RECORDS); the debris sharing the effect keeps its four real corners, because its spin is folded into them.

Public static variables

static std::int32_t Size constexpr
Width and height of every tile, in pixels and in texels.
static std::uint8_t FlipX constexpr
Horizontal flip, see Flags.
static std::uint8_t FlipY constexpr
Vertical flip, see Flags.

Public variables

float X
Top-left corner of the tile, in the space the command's transformation maps.
float Y
std::uint16_t TexX
Top-left texel of the tile in the atlas chunk the mesh samples.
std::uint16_t TexY
std::uint8_t Alpha
Alpha of the tile (it modulates the layer colour).
std::uint8_t Flags
Combination of FlipX and FlipY.
std::uint16_t Reserved