|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
The GPU image of a GlyphAtlas, for anything that samples glyph coverage. More...
#include <AtlasImage.hpp>
Collaboration diagram for MayaFlux::Portal::Text::AtlasImage:Public Member Functions | |
| uint64_t | generation () const noexcept |
| Increments every time sync() replaces the image object. | |
| const std::shared_ptr< Core::VKImage > & | image () const noexcept |
| The image from the last sync(), null before the first. | |
| std::shared_ptr< Core::VKImage > | sync (GlyphAtlas &atlas) |
Bring the image up to date with atlas. | |
Private Attributes | |
| const GlyphAtlas * | m_atlas { nullptr } |
| uint64_t | m_generation { 0 } |
| std::shared_ptr< Core::VKImage > | m_image |
| uint32_t | m_size { 0 } |
The GPU image of a GlyphAtlas, for anything that samples glyph coverage.
Holds an R8 image of the atlas and keeps it current: sync() uploads the atlas when glyphs were rasterized since the last call, and recreates the image when the atlas was replaced or grew. Growth rewrites every glyph's UVs, so generation() increments whenever the image object changes; vertices built against an earlier generation are stale and must be re-emitted, and the image must be bound again where it was bound.
The atlas dirty flag is consumed here: one AtlasImage per atlas.
Definition at line 24 of file AtlasImage.hpp.