MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ text_image()

std::shared_ptr< Core::VKImage > MayaFlux::Portal::Forma::internal::Atelier::text_image ( )
nodiscardprivate

Definition at line 153 of file Atelier.cpp.

154{
155 if (auto* atlas = Text::TypeFaceFoundry::instance().get_default_glyph_atlas()) {
156 if (auto image = atlas_image(*atlas).sync(*atlas)) {
157 return image;
158 }
159 }
160
161 if (!m_text_fallback || !m_text_fallback->is_initialized()) {
162 auto& loom = Graphics::get_texture_manager();
163 if (loom.is_initialized()) {
164 constexpr uint8_t k_empty = 0;
165 m_text_fallback = loom.create_2d(1, 1, Graphics::ImageFormat::R8, &k_empty, 1);
166 }
167 }
168 return m_text_fallback;
169}
std::shared_ptr< Core::VKImage > m_text_fallback
Definition Atelier.hpp:346
Text::AtlasImage & atlas_image(const Text::GlyphAtlas &atlas)
The GPU image of atlas, shared by every text slice drawing from it.
Definition Atelier.hpp:98
std::shared_ptr< Core::VKImage > sync(GlyphAtlas &atlas)
Bring the image up to date with atlas.
Definition AtlasImage.cpp:9
MAYAFLUX_API TextureLoom & get_texture_manager()
Get the global texture manager instance.

References atlas_image(), MayaFlux::Portal::Graphics::get_texture_manager(), MayaFlux::Portal::Text::TypeFaceFoundry::instance(), m_text_fallback, and MayaFlux::Portal::Text::AtlasImage::sync().

Referenced by create_batch(), and ~Atelier().

Here is the call graph for this function:
Here is the caller graph for this function: