summaryrefslogtreecommitdiff
path: root/macosx
diff options
context:
space:
mode:
authorKonstantin Käfer <github@kkaefer.com>2014-01-08 14:32:58 +0100
committerKonstantin Käfer <github@kkaefer.com>2014-01-08 14:32:58 +0100
commit7526d681e287264d4b4f7b81e3f7cd68dae97bfb (patch)
tree88d1d2b26292225dcc647dacea9e0b52fded102b /macosx
parent7253f808c6eda60fc76547faf165b329a1fd99bc (diff)
downloadqtlocation-mapboxgl-7526d681e287264d4b4f7b81e3f7cd68dae97bfb.tar.gz
calculate proper tile position
Diffstat (limited to 'macosx')
-rw-r--r--macosx/main.mm11
1 files changed, 4 insertions, 7 deletions
diff --git a/macosx/main.mm b/macosx/main.mm
index caa56d999e..864803354a 100644
--- a/macosx/main.mm
+++ b/macosx/main.mm
@@ -10,8 +10,7 @@ public:
dirty(true),
tracking(false),
platform(new llmr::platform(this)),
- painter(new llmr::painter(platform)),
- map(new llmr::map(platform, painter)) {
+ map(new llmr::map(platform)) {
if (!glfwInit()) {
fprintf(stderr, "Failed to initialize glfw\n");
exit(1);
@@ -26,12 +25,12 @@ public:
glfwMakeContextCurrent(window);
- painter->setup();
+ map->setup();
int width, height;
glfwGetWindowSize(window, &width, &height);
- painter->resize(width, height);
+ map->resize(width, height);
glfwSwapInterval(1);
@@ -68,7 +67,7 @@ public:
static void resize(GLFWwindow *window, int width, int height) {
MapView *view = (MapView *)glfwGetWindowUserPointer(window);
- view->painter->resize(width, height);
+ view->map->resize(width, height);
}
static void mouseclick(GLFWwindow *window, int button, int action, int modifiers) {
@@ -125,7 +124,6 @@ public:
~MapView() {
delete map;
- delete painter;
delete platform;
glfwTerminate();
}
@@ -137,7 +135,6 @@ public:
GLFWwindow *window;
llmr::platform *platform;
- llmr::painter *painter;
llmr::map *map;
};