diff options
-rw-r--r-- | platform/glfw/glfw_view.cpp | 10 | ||||
-rw-r--r-- | platform/glfw/glfw_view.hpp | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/platform/glfw/glfw_view.cpp b/platform/glfw/glfw_view.cpp index 362269b8e4..3eb895b8e7 100644 --- a/platform/glfw/glfw_view.cpp +++ b/platform/glfw/glfw_view.cpp @@ -54,6 +54,8 @@ GLFWView::GLFWView(bool fullscreen_, bool benchmark_) width = videoMode->width; height = videoMode->height; } + width = 800; + height = 500; glfwWindowHint(GLFW_COCOA_GRAPHICS_SWITCHING, GL_TRUE); @@ -525,6 +527,14 @@ void GLFWView::run() { } glfwPollEvents(); + auto *view = reinterpret_cast<GLFWView *>(glfwGetWindowUserPointer(window)); + if ((frameCount / 30) % 2 == 0) { + view->map->setLatLng(mbgl::LatLng(0, 170)); + } else { + view->map->setLatLng(mbgl::LatLng(0, -170)); + } + + frameCount++; if (dirty && rendererFrontend) { dirty = false; diff --git a/platform/glfw/glfw_view.hpp b/platform/glfw/glfw_view.hpp index d5acf697f7..20c584ee2f 100644 --- a/platform/glfw/glfw_view.hpp +++ b/platform/glfw/glfw_view.hpp @@ -107,6 +107,7 @@ private: int frames = 0; float frameTime = 0; double lastReported = 0; + int frameCount = 0; int width = 1024; int height = 768; |