diff options
-rw-r--r-- | src/renderer/painter_symbol.cpp | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/src/renderer/painter_symbol.cpp b/src/renderer/painter_symbol.cpp index 2992199b3c..8ca8624adf 100644 --- a/src/renderer/painter_symbol.cpp +++ b/src/renderer/painter_symbol.cpp @@ -119,21 +119,6 @@ void Painter::renderSymbol(SymbolBucket &bucket, util::ptr<StyleLayer> layer_des glDisable(GL_STENCIL_TEST); - if (bucket.hasTextData()) { - GlyphAtlas &glyphAtlas = *map.getGlyphAtlas(); - glyphAtlas.bind(); - - renderSDF(bucket, - id, - matrix, - bucket.properties.text, - properties.text, - 24.0f, - {{ float(glyphAtlas.width) / 4, float(glyphAtlas.height) / 4 }}, - *sdfGlyphShader, - &SymbolBucket::drawGlyphs); - } - if (bucket.hasIconData()) { bool sdf = bucket.sdfIcons; @@ -205,5 +190,19 @@ void Painter::renderSymbol(SymbolBucket &bucket, util::ptr<StyleLayer> layer_des } } + if (bucket.hasTextData()) { + GlyphAtlas &glyphAtlas = *map.getGlyphAtlas(); + glyphAtlas.bind(); + + renderSDF(bucket, + id, + matrix, + bucket.properties.text, + properties.text, + 24.0f, + {{ float(glyphAtlas.width) / 4, float(glyphAtlas.height) / 4 }}, + *sdfGlyphShader, + &SymbolBucket::drawGlyphs); + } glEnable(GL_STENCIL_TEST); } |