ZenitUI
Retained-mode C++20 UI framework
Loading...
Searching...
No Matches
ZenitUI::Geometry2D::StaticMesh< MaxVertices, MaxIndices > Struct Template Reference

Fixed-capacity stack mesh returned by Geometry2D builders. More...

#include <Geometry2D.hpp>

Public Member Functions

std::span< const Vertex2D > vertexSpan () const noexcept
std::span< const uint32_t > indexSpan () const noexcept
bool empty () const noexcept
void pushVertex (Vec2 pos, Vec2 uv, Color c) noexcept
void pushTri (uint32_t i0, uint32_t i1, uint32_t i2) noexcept
void pushQuadIndices (uint32_t tl, uint32_t tr, uint32_t br, uint32_t bl) noexcept

Public Attributes

std::array< Vertex2D, MaxVertices > vertices {}
std::array< uint32_t, MaxIndices > indices {}
uint32_t vertexCount {0}
uint32_t indexCount {0}

Detailed Description

template<size_t MaxVertices, size_t MaxIndices>
struct ZenitUI::Geometry2D::StaticMesh< MaxVertices, MaxIndices >

Fixed-capacity stack mesh returned by Geometry2D builders.

Avoids heap allocations during per-frame tessellation while exposing std::span views directly consumable by IRenderer::drawGeometry.


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