fix collision box clipping
and name parameters when it's not clear from their type
This commit is contained in:
@@ -247,6 +247,7 @@ Some styles in JSON format are included at `./styles`. See the [style spec](http
|
||||
- Press `X` to reset the transform
|
||||
- Press `N` to reset north
|
||||
- Press `Tab` to toggle debug information
|
||||
- Press 'C' to toggle symbol collision debug boxes
|
||||
- Press `Esc` to quit
|
||||
|
||||
## Mobile
|
||||
|
||||
@@ -17,9 +17,9 @@ public:
|
||||
SpriteAtlas&,
|
||||
util::ptr<Sprite>,
|
||||
const SourceInfo&,
|
||||
float,
|
||||
float,
|
||||
bool);
|
||||
float overscaling_,
|
||||
float angle_,
|
||||
bool collisionDebug_);
|
||||
~LiveTileData();
|
||||
|
||||
void parse() override;
|
||||
|
||||
@@ -39,9 +39,9 @@ public:
|
||||
SpriteAtlas&,
|
||||
util::ptr<Sprite>,
|
||||
const SourceInfo&,
|
||||
float,
|
||||
float,
|
||||
bool);
|
||||
float overscaling_,
|
||||
float angle_,
|
||||
bool collisionDebug_);
|
||||
~VectorTileData();
|
||||
|
||||
void parse() override;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user