summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorartemp <artem@mapnik.org>2014-10-28 15:43:10 -0400
committerartemp <artem@mapnik.org>2014-10-28 15:43:10 -0400
commit14829db508035426ef8a38d1f8dc83a8ccf60b0f (patch)
treeebe7eabdc8b73193bcee85b977d382b9ded34067 /src
parent0d4f625951d11ea156a90ff7d32068ae3ca222c0 (diff)
downloadqtlocation-mapboxgl-14829db508035426ef8a38d1f8dc83a8ccf60b0f.tar.gz
fix text/icon rendering order (#470)
Diffstat (limited to 'src')
-rw-r--r--src/renderer/painter_symbol.cpp29
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);
}