summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-01-23 15:52:59 +0100
committerKonstantin Käfer <mail@kkaefer.com>2014-01-23 15:52:59 +0100
commit9ba8d5b7a6599ae19e4d6eaccdc7a948a8663aa0 (patch)
tree7362f40382b78dd774648cc1a88bad006a339ead /src
parente3f98b0f130bf2d722ee0ae829e427a99fa8354a (diff)
downloadqtlocation-mapboxgl-9ba8d5b7a6599ae19e4d6eaccdc7a948a8663aa0.tar.gz
pass through name when rendering
Diffstat (limited to 'src')
-rw-r--r--src/renderer/fill_bucket.cpp9
-rw-r--r--src/renderer/painter.cpp10
2 files changed, 10 insertions, 9 deletions
diff --git a/src/renderer/fill_bucket.cpp b/src/renderer/fill_bucket.cpp
index bfd7293cbb..f3d09511d3 100644
--- a/src/renderer/fill_bucket.cpp
+++ b/src/renderer/fill_bucket.cpp
@@ -112,11 +112,6 @@ void FillBucket::drawVertices(int32_t attrib) {
glDrawArrays(GL_LINE_STRIP, 0, length);
}
-void FillBucket::render(Painter& painter) {
- // TODO: obtain the correct style information for this layer
- FillProperties properties;
- properties.fill_color = {{ 0, 0, 1, 0.5 }};
- properties.stroke_color = properties.fill_color;
-
- painter.renderFill(*this, properties);
+void FillBucket::render(Painter& painter, const std::string& layer_name) {
+ painter.renderFill(*this, layer_name);
}
diff --git a/src/renderer/painter.cpp b/src/renderer/painter.cpp
index dc78dab54d..e899e81927 100644
--- a/src/renderer/painter.cpp
+++ b/src/renderer/painter.cpp
@@ -169,7 +169,7 @@ void Painter::render(const Tile::Ptr& tile) {
// glDrawArrays(GL_LINE_STRIP, 0, tile->lineVertex.length());
for (Layer& layer : tile->layers) {
- layer.bucket->render(*this);
+ layer.bucket->render(*this, layer.name);
}
if (settings.debug) {
@@ -179,7 +179,13 @@ void Painter::render(const Tile::Ptr& tile) {
renderBackground();
}
-void Painter::renderFill(FillBucket& bucket, const FillProperties& properties) {
+void Painter::renderFill(FillBucket& bucket, const std::string& layer_name) {
+ // TODO: obtain the correct style information for this layer
+ FillProperties properties;
+ properties.fill_color = {{ 0, 0, 1, 0.5 }};
+ properties.stroke_color = properties.fill_color;
+
+
// Draw the stencil mask.
{
// We're only drawing to the first seven bits (== support a maximum of