Continue adding opengl font support.

This commit is contained in:
James Grogan 2022-11-15 15:50:36 +00:00
parent 649079a5c7
commit eef93efc29
37 changed files with 530 additions and 157 deletions

View file

@ -20,4 +20,20 @@ IFontEngine* FontsManager::getFontEngine() const
return mFontEngine.get();
}
FontGlyph* FontsManager::getGlyph(char c)
{
auto iter = mGlyphs.find(c);
if(iter != mGlyphs.end())
{
return iter->second.get();
}
else
{
auto glyph = mFontEngine->loadGlyph(c);
auto glyph_ptr = glyph.get();
mGlyphs[c] = std::move(glyph);
return glyph_ptr;
}
}