diff options
author | Ansis Brammanis <brammanis@gmail.com> | 2015-07-02 12:31:50 +0200 |
---|---|---|
committer | Ansis Brammanis <brammanis@gmail.com> | 2015-07-02 12:31:50 +0200 |
commit | 45e4938f9e19af8ddd389015d84067eb536da0ca (patch) | |
tree | 3bb98f72b34a8c94c1f5f82f660a1a6fd9323f33 /src | |
parent | 4a44b70407fb003fb051e50d46367cd03883210a (diff) | |
download | qtlocation-mapboxgl-45e4938f9e19af8ddd389015d84067eb536da0ca.tar.gz |
fix cross-tile label collisions
fix #1816
fix #1689
The missing label was the only one in it's bucket. Since the label was
outside the tile boundaries it wouldn't need to be drawn by the bucket.
Since the bucket had no features to draw, it was dropped completely.
Even if a bucket doesn't have any features that need to be rendered, it
may have features that need to impact the placement of features in other
layers.
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/renderer/painter_symbol.cpp | 4 | ||||
-rw-r--r-- | src/mbgl/renderer/symbol_bucket.cpp | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/mbgl/renderer/painter_symbol.cpp b/src/mbgl/renderer/painter_symbol.cpp index 4f4999b3e2..6762bcd4d9 100644 --- a/src/mbgl/renderer/painter_symbol.cpp +++ b/src/mbgl/renderer/painter_symbol.cpp @@ -122,9 +122,7 @@ void Painter::renderSymbol(SymbolBucket &bucket, const StyleLayer &layer_desc, c config.depthTest = true; config.depthMask = GL_FALSE; - if (bucket.hasCollisionBoxData() && ( - (bucket.hasIconData() && properties.icon.opacity) || - (bucket.hasTextData() && properties.text.opacity))) { + if (bucket.hasCollisionBoxData()) { config.stencilTest = true; useProgram(collisionBoxShader->program); diff --git a/src/mbgl/renderer/symbol_bucket.cpp b/src/mbgl/renderer/symbol_bucket.cpp index 9f05209ffa..d52561d3ec 100644 --- a/src/mbgl/renderer/symbol_bucket.cpp +++ b/src/mbgl/renderer/symbol_bucket.cpp @@ -80,7 +80,7 @@ void SymbolBucket::render(Painter& painter, painter.renderSymbol(*this, layer_desc, id, matrix); } -bool SymbolBucket::hasData() const { return hasTextData() || hasIconData(); } +bool SymbolBucket::hasData() const { return hasTextData() || hasIconData() || symbolInstances.size(); } bool SymbolBucket::hasTextData() const { return renderData && !renderData->text.groups.empty(); } |