summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnsis Brammanis <brammanis@gmail.com>2015-06-03 19:17:49 -0400
committerAnsis Brammanis <brammanis@gmail.com>2015-06-03 19:17:49 -0400
commit2bd7e4550296ce5f58abef93667bb92464317dc9 (patch)
treea5c927502a267d911729e9c028298733b1c82c43 /src
parent1f5fb1db4afae8a8bae02c42870f6f9e5e5f7905 (diff)
downloadqtlocation-mapboxgl-2bd7e4550296ce5f58abef93667bb92464317dc9.tar.gz
fix collision box clipping
and name parameters when it's not clear from their type
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/map/live_tile_data.hpp6
-rw-r--r--src/mbgl/map/vector_tile_data.hpp6
-rw-r--r--src/mbgl/renderer/painter_symbol.cpp21
3 files changed, 17 insertions, 16 deletions
diff --git a/src/mbgl/map/live_tile_data.hpp b/src/mbgl/map/live_tile_data.hpp
index 7066fe13c9..4dfe832f64 100644
--- a/src/mbgl/map/live_tile_data.hpp
+++ b/src/mbgl/map/live_tile_data.hpp
@@ -17,9 +17,9 @@ public:
SpriteAtlas&,
util::ptr<Sprite>,
const SourceInfo&,
- float,
- float,
- bool);
+ float overscaling_,
+ float angle_,
+ bool collisionDebug_);
~LiveTileData();
void parse() override;
diff --git a/src/mbgl/map/vector_tile_data.hpp b/src/mbgl/map/vector_tile_data.hpp
index bb60668c8b..2c7c3a204a 100644
--- a/src/mbgl/map/vector_tile_data.hpp
+++ b/src/mbgl/map/vector_tile_data.hpp
@@ -39,9 +39,9 @@ public:
SpriteAtlas&,
util::ptr<Sprite>,
const SourceInfo&,
- float,
- float,
- bool);
+ float overscaling_,
+ float angle_,
+ bool collisionDebug_);
~VectorTileData();
void parse() override;
diff --git a/src/mbgl/renderer/painter_symbol.cpp b/src/mbgl/renderer/painter_symbol.cpp
index 9710120a0c..dea6b8a6e6 100644
--- a/src/mbgl/renderer/painter_symbol.cpp
+++ b/src/mbgl/renderer/painter_symbol.cpp
@@ -119,16 +119,6 @@ void Painter::renderSymbol(SymbolBucket &bucket, const StyleLayer &layer_desc, c
const auto &properties = layer_desc.getProperties<SymbolProperties>();
const auto &layout = bucket.layout;
- // TODO remove the `|| true` when #1673 is implemented
- const bool drawAcrossEdges = !(layout.text.allow_overlap || layout.icon.allow_overlap ||
- layout.text.ignore_placement || layout.icon.ignore_placement) || true;
-
- // Disable the stencil test so that labels aren't clipped to tile boundaries.
- //
- // Layers with features that may be drawn overlapping aren't clipped. These
- // layers are sorted in the y direction, and to draw the correct ordering near
- // tile edges the icons are included in both tiles and clipped when drawing.
- config.stencilTest = drawAcrossEdges ? false : true;
config.depthTest = true;
config.depthMask = GL_FALSE;
@@ -149,6 +139,17 @@ void Painter::renderSymbol(SymbolBucket &bucket, const StyleLayer &layer_desc, c
}
+ // TODO remove the `|| true` when #1673 is implemented
+ const bool drawAcrossEdges = !(layout.text.allow_overlap || layout.icon.allow_overlap ||
+ layout.text.ignore_placement || layout.icon.ignore_placement) || true;
+
+ // Disable the stencil test so that labels aren't clipped to tile boundaries.
+ //
+ // Layers with features that may be drawn overlapping aren't clipped. These
+ // layers are sorted in the y direction, and to draw the correct ordering near
+ // tile edges the icons are included in both tiles and clipped when drawing.
+ config.stencilTest = drawAcrossEdges ? false : true;
+
if (bucket.hasIconData()) {
bool sdf = bucket.sdfIcons;