summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-01-21 16:16:21 +0100
committerKonstantin Käfer <mail@kkaefer.com>2014-01-21 16:16:21 +0100
commit474fb42807e855825909ed818a6d410b1b062d4c (patch)
tree985e2412ca4100e9fbb38846c74f790383e9270b /src
parent50f99e414ed02e6ab0edb9425b8c1074623b4719 (diff)
downloadqtlocation-mapboxgl-474fb42807e855825909ed818a6d410b1b062d4c.tar.gz
make it work on retina screens
Diffstat (limited to 'src')
-rw-r--r--src/map/map.cpp4
-rw-r--r--src/renderer/painter.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/map/map.cpp b/src/map/map.cpp
index 768a4fc164..913dd7e4aa 100644
--- a/src/map/map.cpp
+++ b/src/map/map.cpp
@@ -32,9 +32,11 @@ void Map::loadSettings() {
update();
}
-void Map::resize(uint32_t width, uint32_t height) {
+void Map::resize(uint32_t width, uint32_t height, uint32_t fb_width, uint32_t fb_height) {
transform.width = width;
transform.height = height;
+ transform.fb_width = fb_width;
+ transform.fb_height = fb_height;
update();
}
diff --git a/src/renderer/painter.cpp b/src/renderer/painter.cpp
index c0e0ce7c91..3928a8e5f3 100644
--- a/src/renderer/painter.cpp
+++ b/src/renderer/painter.cpp
@@ -154,7 +154,7 @@ void Painter::render(const Tile::Ptr& tile) {
tile->lineVertex.bind();
glVertexAttribPointer(outlineShader->a_pos, 2, GL_SHORT, GL_FALSE, 0, BUFFER_OFFSET(0));
glUniform4f(outlineShader->u_color, 0.0f, 0.0f, 0.0f, 1.0f);
- glUniform2f(outlineShader->u_world, transform.width, transform.height);
+ glUniform2f(outlineShader->u_world, transform.fb_width, transform.fb_height);
glLineWidth(2.0f);
glDrawArrays(GL_LINE_STRIP, 0, tile->lineVertex.length());