Added mutex lock to avoid threading issues when glyphs are added to a Font from multiple threads

This commit is contained in:
Robert Osfield
2020-01-31 10:37:25 +00:00
parent 36e47d31bd
commit 2e0472ba7e

View File

@@ -492,6 +492,8 @@ void Font::addGlyph(const FontResolution& fontRes, unsigned int charcode, Glyph*
void Font::assignGlyphToGlyphTexture(Glyph* glyph, ShaderTechnique shaderTechnique)
{
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_glyphMapMutex);
int posX=0,posY=0;
GlyphTexture* glyphTexture = 0;