A read-only collection of atlas snapshots for the inspector.
More...
#include <atlas_inventory.hpp>
|
| void | add (AtlasInfo info) |
| | Append a pre-built AtlasInfo snapshot.
|
| template<typename Atlas> |
| void | add_atlas (const Atlas &atlas, AtlasKind kind, std::string label={}, int pages=1) |
| | Snapshot any width/height/occupancy atlas straight into the inventory.
|
| void | add_gradient (const GradientAtlas &atlas, std::string label={}, int ramp_width=256) |
| | Snapshot a GradientAtlas straight into the inventory.
|
| void | clear () |
| | Drop every snapshot — call before re-populating each frame the inspector refreshes.
|
| const std::vector< AtlasInfo > & | atlases () const |
| | All atlas snapshots, in insertion order.
|
| std::size_t | size () const |
| | Number of atlas snapshots held.
|
| bool | empty () const |
| | True when no atlas has been registered — the inspector renders the "GPU atlas unavailable" empty state in this case.
|
| int | total_pages () const |
| | Total GPU texture pages across every registered atlas.
|
| std::size_t | total_entries () const |
| | Total live packed regions (glyphs / images / ramps / paths) across every atlas.
|
| float | average_occupancy () const |
| | Mean occupancy across all atlases, in [0, 1]; 0 when empty.
|
A read-only collection of atlas snapshots for the inspector.
The render layer (or a test) builds an inventory by calling snapshot() on each live atlas; the inspector overlay is then handed a pointer to the inventory and renders one row per entry. The inventory invents no data — every field of every AtlasInfo comes straight from an atlas's own introspection accessors.
◆ add()
| void pulp::render::AtlasInventory::add |
( |
AtlasInfo | info | ) |
|
|
inline |
◆ add_atlas()
template<typename Atlas>
| void pulp::render::AtlasInventory::add_atlas |
( |
const Atlas & | atlas, |
|
|
AtlasKind | kind, |
|
|
std::string | label = {}, |
|
|
int | pages = 1 ) |
|
inline |
Snapshot any width/height/occupancy atlas straight into the inventory.
◆ add_gradient()
| void pulp::render::AtlasInventory::add_gradient |
( |
const GradientAtlas & | atlas, |
|
|
std::string | label = {}, |
|
|
int | ramp_width = 256 ) |
|
inline |
◆ atlases()
| const std::vector< AtlasInfo > & pulp::render::AtlasInventory::atlases |
( |
| ) |
const |
|
inline |
All atlas snapshots, in insertion order.
◆ average_occupancy()
| float pulp::render::AtlasInventory::average_occupancy |
( |
| ) |
const |
|
inline |
Mean occupancy across all atlases, in [0, 1]; 0 when empty.
◆ clear()
| void pulp::render::AtlasInventory::clear |
( |
| ) |
|
|
inline |
Drop every snapshot — call before re-populating each frame the inspector refreshes.
◆ empty()
| bool pulp::render::AtlasInventory::empty |
( |
| ) |
const |
|
inline |
True when no atlas has been registered — the inspector renders the "GPU atlas unavailable" empty state in this case.
◆ size()
| std::size_t pulp::render::AtlasInventory::size |
( |
| ) |
const |
|
inline |
Number of atlas snapshots held.
◆ snapshot()
template<typename Atlas>
| AtlasInfo pulp::render::AtlasInventory::snapshot |
( |
const Atlas & | atlas, |
|
|
AtlasKind | kind, |
|
|
std::string | label = {}, |
|
|
int | pages = 1 ) |
|
inlinestatic |
Capture a snapshot of an ImageAtlas / GlyphAtlas / PathAtlas — any atlas type exposing width()/height()/occupancy()/ entry_count().
pages defaults to 1 (Pulp's atlas classes are single-page today); a caller that spills across pages can pass the real count.
◆ snapshot_gradient()
| AtlasInfo pulp::render::AtlasInventory::snapshot_gradient |
( |
const GradientAtlas & | atlas, |
|
|
std::string | label = {}, |
|
|
int | ramp_width = 256 ) |
|
inlinestatic |
GradientAtlas is row-packed (no width/height) — give it an explicit dedicated snapshot.
The ramp width is a caller-supplied convention (gradient ramps are typically 256 texels wide); the page height is the row budget.
◆ total_entries()
| std::size_t pulp::render::AtlasInventory::total_entries |
( |
| ) |
const |
|
inline |
Total live packed regions (glyphs / images / ramps / paths) across every atlas.
◆ total_pages()
| int pulp::render::AtlasInventory::total_pages |
( |
| ) |
const |
|
inline |
Total GPU texture pages across every registered atlas.
The documentation for this class was generated from the following file: