diff options
author | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2020-02-26 14:25:48 +0200 |
---|---|---|
committer | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2020-03-05 17:43:37 +0200 |
commit | ca4356fd0f1bb3dc78052a0a514f2ddb82f8376b (patch) | |
tree | f2bcb7b47ed73154aa3764894c3c17dc05966f4b /platform/glfw/main.cpp | |
parent | 9a0bc1b58b775209417582867c713b2015353a78 (diff) | |
download | qtlocation-mapboxgl-ca4356fd0f1bb3dc78052a0a514f2ddb82f8376b.tar.gz |
[glfw] Add snapshotter to glfw test app
Diffstat (limited to 'platform/glfw/main.cpp')
-rw-r--r-- | platform/glfw/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/glfw/main.cpp b/platform/glfw/main.cpp index 784e002a65..fa1ac73799 100644 --- a/platform/glfw/main.cpp +++ b/platform/glfw/main.cpp @@ -95,9 +95,6 @@ int main(int argc, char *argv[]) { mbgl::Log::Info(mbgl::Event::General, "BENCHMARK MODE: Some optimizations are disabled."); } - GLFWView backend(fullscreen, benchmark); - view = &backend; - // Set access token if present std::string token(getenv("MAPBOX_ACCESS_TOKEN") ?: ""); if (token.empty()) { @@ -107,6 +104,9 @@ int main(int argc, char *argv[]) { mbgl::ResourceOptions resourceOptions; resourceOptions.withCachePath(cacheDB).withAccessToken(token); + GLFWView backend(fullscreen, benchmark, resourceOptions); + view = &backend; + std::shared_ptr<mbgl::FileSource> onlineFileSource = mbgl::FileSourceManager::get()->getFileSource(mbgl::FileSourceType::Network, resourceOptions); if (!settings.online) { |