diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-01-15 11:34:41 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-01-15 11:34:41 +0100 |
commit | 44a0f98fe54a7a2954c46137b9aac3e149ad7958 (patch) | |
tree | 8eee70ecb491f629b32ed179ad7cbbdfacc7d2d8 /macosx | |
parent | 60a8fdca5727bc57bd6526e5447e2cc41db1ada8 (diff) | |
download | qtlocation-mapboxgl-44a0f98fe54a7a2954c46137b9aac3e149ad7958.tar.gz |
retain child tiles
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/main.mm | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/macosx/main.mm b/macosx/main.mm index 23d75b4679..15f4727700 100644 --- a/macosx/main.mm +++ b/macosx/main.mm @@ -20,6 +20,9 @@ public: exit(1); } + glfwWindowHint(GLFW_STENCIL_BITS, 8); + glfwWindowHint(GLFW_DEPTH_BITS, 16); + window = glfwCreateWindow(640, 480, "llmr", NULL, NULL); if (!window) { glfwTerminate(); @@ -29,6 +32,9 @@ public: glfwMakeContextCurrent(window); + int stencil_bits = glfwGetWindowAttrib(window, GLFW_STENCIL_BITS); + fprintf(stderr, "stencil bits: %d\n", stencil_bits); + map->setup(); @@ -173,6 +179,7 @@ void restart(void *) { } void request(void *, tile::ptr tile) { + assert((bool)tile); // fprintf(stderr, "request %d/%d/%d\n", tile->z, tile->x, tile->y); // fprintf(stderr, "requesting tile\n"); @@ -180,9 +187,9 @@ void request(void *, tile::ptr tile) { NSString *urlTemplate = @"http://localhost:3333/gl/tiles/plain/%d-%d-%d.vector.pbf"; NSString *urlString = [NSString stringWithFormat:urlTemplate, - tile->z, - tile->x, - tile->y]; + tile->id.z, + tile->id.x, + tile->id.y]; NSURL *url = [NSURL URLWithString:urlString]; // NSLog(@"Requesting %@", urlString); @@ -210,12 +217,9 @@ void request(void *, tile::ptr tile) { }); return; } - } else { - fprintf(stderr, "[%s] status code %d\n", [urlString UTF8String], code); - dispatch_async(dispatch_get_main_queue(), ^ { - view->map->tileFailed(tile); - }); } + + fprintf(stderr, "[%s] status code %d\n", [urlString UTF8String], code); } dispatch_async(dispatch_get_main_queue(), ^ { |