MCPcopy Create free account
hub / github.com/OpenImageDebugger/OpenImageDebugger / GlyphAtlas

Class GlyphAtlas

src/visualization/glyph_atlas.h:44–54  ·  view source on GitHub ↗

Pure CPU-side glyph atlas data -- no GL, no Qt. Produced by finalize_strip_atlas() below from a rendered single-line glyph strip, and consumed by GLTextRenderer::upload_atlas() to populate a GL texture.

Source from the content-addressed store, hash-verified

42// finalize_strip_atlas() below from a rendered single-line glyph strip, and
43// consumed by GLTextRenderer::upload_atlas() to populate a GL texture.
44struct GlyphAtlas {
45 float texture_width{0}; // pow2 dims
46 float texture_height{0}; // pow2 dims
47 std::vector<std::uint8_t>
48 pixels; // R8, texture_width*texture_height, packed rows
49
50 Array_256_2 offsets{};
51 Array_256_2 advances{};
52 Array_256_2 sizes{};
53 Array_256_2 tls{};
54};
55
56// Takes the rendered single-line strip (grayscale8, strip_w x strip_h,
57// glyphs laid left-to-right at the given advances) and produces the

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected