Skip to content

ludus::graphics::renderer::OverlayList

Ludus Wiki · API overview · Browse API

Class

Reusable bounded CPU triangle arena. Single owner thread; no append allocations. Initialize reserves storage once; Clear resets counts, never capacity. Commands merge only when adjacent and their depth/scissor state agrees. Failure preserves all geometry; capacity failures increment DroppedCommands. See renderer-systems.md.

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/overlays.hpp

#include <ludus/graphics/renderer/overlays.hpp>
class ludus::graphics::renderer::OverlayList final

Static fields

MAX_VERTICES

static constexpr foundation::usize ludus::graphics::renderer::OverlayList::MAX_VERTICES = 3072
Maximum vertices (512 independent quads) per prepared version.

Related types: foundation::usize

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/overlays.hpp

MAX_COMMANDS

static constexpr foundation::usize ludus::graphics::renderer::OverlayList::MAX_COMMANDS = 256
Maximum adjacent compatibility runs per prepared version.

Related types: foundation::usize

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/overlays.hpp

Methods

OverlayList

ludus::graphics::renderer::OverlayList::OverlayList() noexcept
Construct without allocation; Initialize before use.

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/overlays.hpp

~OverlayList

ludus::graphics::renderer::OverlayList::~OverlayList()
Release CPU storage; GPU prepared copies are independent.

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/overlays.hpp

Initialize

rhi::RasterStatus ludus::graphics::renderer::OverlayList::Initialize() noexcept
Allocate the reusable arena. Ready also means already initialized.

Related types: rhi::RasterStatus

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/overlays.hpp

Clear

void ludus::graphics::renderer::OverlayList::Clear() noexcept
Empty the list and diagnostics without allocating.

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/overlays.hpp

Append

rhi::RasterStatus ludus::graphics::renderer::OverlayList::Append(const OverlayVertex *vertices, foundation::usize count, const OverlayStyle &style={}) noexcept
Append complete triangles. Copies vertices; count must be divisible by three. Invalid/nonfinite colors, clip positions, UVs or styles preserve the list.

Related types: foundation::usize · rhi::RasterStatus · OverlayStyle · OverlayVertex

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/overlays.hpp

Quad

rhi::RasterStatus ludus::graphics::renderer::OverlayList::Quad(foundation::math::Vector4 rectangle, foundation::math::Vector4 uv, foundation::math::Vector4 color, foundation::uint32 width, foundation::uint32 height, bool coverage=false, const OverlayStyle &style={}) noexcept
Append a physical-pixel quad, top-left coordinates and top-left UVs. Extent must be positive, rectangle and UV edges finite and ordered. Zero area succeeds without geometry. Solid ignores UV sampling; coverage uses R8.

Related types: foundation::uint32 · rhi::RasterStatus · foundation::math::Vector4 · OverlayStyle

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/overlays.hpp

Line

rhi::RasterStatus ludus::graphics::renderer::OverlayList::Line(foundation::math::Vector4 start, foundation::math::Vector4 end, foundation::math::Vector4 color, foundation::float32 physicalWidth, foundation::uint32 width, foundation::uint32 height, const OverlayStyle &style={}) noexcept
Expand homogeneous endpoints into a butt-cap physical-pixel line (minimum width one). Clips W >= 1e-6 and canonical near/far planes before division. Zero projected length becomes a square; fully clipped lines produce no draw. Width <= 0, nonfinite data or zero viewport extent are invalid.

Related types: foundation::float32 · foundation::uint32 · rhi::RasterStatus · foundation::math::Vector4 · OverlayStyle

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/overlays.hpp

Vertices

const OverlayVertex * ludus::graphics::renderer::OverlayList::Vertices() const noexcept
Borrow contiguous vertices until Clear, Append, or destruction.

Related types: OverlayVertex

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/overlays.hpp

VertexCount

foundation::usize ludus::graphics::renderer::OverlayList::VertexCount() const noexcept
Active vertex count; zero before initialization.

Related types: foundation::usize

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/overlays.hpp

Commands

const OverlayCommand * ludus::graphics::renderer::OverlayList::Commands() const noexcept
Borrow painter-ordered runs until list mutation/destruction.

Related types: OverlayCommand

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/overlays.hpp

CommandCount

foundation::usize ludus::graphics::renderer::OverlayList::CommandCount() const noexcept
Active command count.

Related types: foundation::usize

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/overlays.hpp

DroppedCommands

foundation::uint64 ludus::graphics::renderer::OverlayList::DroppedCommands() const noexcept
Complete append operations rejected for capacity since Clear.

Related types: foundation::uint64

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/overlays.hpp