Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
esengine::RetainedTextStore Class Reference

The retained geometry of every label, by entity. Ordered: a frame submits in entity order, not in whatever order a hash left them. More...

#include <RetainedText.hpp>

Public Member Functions

void begin (u32 entity, bool sdf, bool screen, bool hasBox, i32 layer, f32 boxWidth, f32 boxHeight, bool autoKind=false)
 Replaces any geometry the entity held, with none yet: batches follow through add().
bool add (u32 entity, const f32 *vertices, i32 vertexCount, const u16 *indices, i32 indexCount, u32 pageId, TextGlyphMode mode=TextGlyphMode::Color)
 One batch of an entity begun with begin(). False when it was not begun or the batch is not whole quads.
void clear (u32 entity)
void clearAll ()
template<typename Visit>
bool takeChanged (Visit &&visit)
 Hands visit every label laid out, given glyphs or let go since the last call, and forgets them; false when they were all let go at once (clearAll), which names none.
u64 revision () const
 Moves with every label laid out, given glyphs or let go: what a pass drawn from the store was drawn from.
usize size () const
std::map< u32, RetainedText > & entries ()

Detailed Description

The retained geometry of every label, by entity. Ordered: a frame submits in entity order, not in whatever order a hash left them.

Definition at line 49 of file RetainedText.hpp.

Member Function Documentation

◆ add()

bool esengine::RetainedTextStore::add ( u32 entity,
const f32 * vertices,
i32 vertexCount,
const u16 * indices,
i32 indexCount,
u32 pageId,
TextGlyphMode mode = TextGlyphMode::Color )
inline

◆ begin()

void esengine::RetainedTextStore::begin ( u32 entity,
bool sdf,
bool screen,
bool hasBox,
i32 layer,
f32 boxWidth,
f32 boxHeight,
bool autoKind = false )
inline

Replaces any geometry the entity held, with none yet: batches follow through add().

Definition at line 52 of file RetainedText.hpp.

◆ clear()

void esengine::RetainedTextStore::clear ( u32 entity)
inline

Definition at line 98 of file RetainedText.hpp.

◆ clearAll()

void esengine::RetainedTextStore::clearAll ( )
inline

Definition at line 103 of file RetainedText.hpp.

◆ entries()

std::map< u32, RetainedText > & esengine::RetainedTextStore::entries ( )
inline

Definition at line 121 of file RetainedText.hpp.

◆ revision()

u64 esengine::RetainedTextStore::revision ( ) const
inline

Moves with every label laid out, given glyphs or let go: what a pass drawn from the store was drawn from.

Definition at line 119 of file RetainedText.hpp.

◆ size()

usize esengine::RetainedTextStore::size ( ) const
inline

Definition at line 120 of file RetainedText.hpp.

◆ takeChanged()

template<typename Visit>
bool esengine::RetainedTextStore::takeChanged ( Visit && visit)
inline

Hands visit every label laid out, given glyphs or let go since the last call, and forgets them; false when they were all let go at once (clearAll), which names none.

Definition at line 111 of file RetainedText.hpp.


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