nCine::RHI::Software::Framebuffer struct

Destination framebuffer the device presents and resolves draws into.

A caller-owned, tightly- or loosely-packed RGBA8 surface. The bytes are laid out as [R, G, B, A] per texel, rows are stored top to bottom and strideBytes is the byte distance between two consecutive rows (allowing padded rows or rendering into a sub-window of a larger surface). The device never allocates or frees this memory (except the screen back-buffer it owns through SwDevice::ResizeScreenFramebuffer()).

Public variables

std::uint8_t* pixels
Pointer to the first byte (top-left texel) of the surface.
std::int32_t width
Width of the surface in pixels.
std::int32_t height
Height of the surface in pixels.
std::int32_t strideBytes
Byte distance between two consecutive rows (usually width * 4).