Continue adding opengl font support.
This commit is contained in:
parent
649079a5c7
commit
eef93efc29
37 changed files with 530 additions and 157 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue