diff options
author | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-11-14 15:23:15 +0200 |
---|---|---|
committer | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-12-02 17:11:49 +0200 |
commit | 2c49c4374cb9e3654c1d347b1071542918ce5fd2 (patch) | |
tree | 9791f6f960939e92a5c891160d86065cc0cf0184 /src/mbgl/layout/symbol_layout.cpp | |
parent | 2bb2a40b6d13d4fe44e8879003a3e53416033a34 (diff) | |
download | qtlocation-mapboxgl-2c49c4374cb9e3654c1d347b1071542918ce5fd2.tar.gz |
[core] Store 'sdf' flag in vertex attribute
Diffstat (limited to 'src/mbgl/layout/symbol_layout.cpp')
-rw-r--r-- | src/mbgl/layout/symbol_layout.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mbgl/layout/symbol_layout.cpp b/src/mbgl/layout/symbol_layout.cpp index 1207c1c668..c03ad8835f 100644 --- a/src/mbgl/layout/symbol_layout.cpp +++ b/src/mbgl/layout/symbol_layout.cpp @@ -597,6 +597,7 @@ void SymbolLayout::addFeature(const std::size_t layoutFeatureIndex, textPlacement, textOffset, imageMap, + iconType, allowVerticalPlacement); }; @@ -864,10 +865,14 @@ size_t SymbolLayout::addSymbol(SymbolBucket::Buffer& buffer, uint16_t index = segment.vertexLength; // coordinates (2 triangles) - buffer.vertices.emplace_back(SymbolSDFIconProgram::layoutVertex(labelAnchor.point, tl, symbol.glyphOffset.y, tex.x, tex.y, sizeData)); - buffer.vertices.emplace_back(SymbolSDFIconProgram::layoutVertex(labelAnchor.point, tr, symbol.glyphOffset.y, tex.x + tex.w, tex.y, sizeData)); - buffer.vertices.emplace_back(SymbolSDFIconProgram::layoutVertex(labelAnchor.point, bl, symbol.glyphOffset.y, tex.x, tex.y + tex.h, sizeData)); - buffer.vertices.emplace_back(SymbolSDFIconProgram::layoutVertex(labelAnchor.point, br, symbol.glyphOffset.y, tex.x + tex.w, tex.y + tex.h, sizeData)); + buffer.vertices.emplace_back(SymbolSDFIconProgram::layoutVertex( + labelAnchor.point, tl, symbol.glyphOffset.y, tex.x, tex.y, sizeData, symbol.isSDF)); + buffer.vertices.emplace_back(SymbolSDFIconProgram::layoutVertex( + labelAnchor.point, tr, symbol.glyphOffset.y, tex.x + tex.w, tex.y, sizeData, symbol.isSDF)); + buffer.vertices.emplace_back(SymbolSDFIconProgram::layoutVertex( + labelAnchor.point, bl, symbol.glyphOffset.y, tex.x, tex.y + tex.h, sizeData, symbol.isSDF)); + buffer.vertices.emplace_back(SymbolSDFIconProgram::layoutVertex( + labelAnchor.point, br, symbol.glyphOffset.y, tex.x + tex.w, tex.y + tex.h, sizeData, symbol.isSDF)); // Dynamic/Opacity vertices are initialized so that the vertex count always agrees with // the layout vertex buffer, but they will always be updated before rendering happens |