@@ -58,6 +58,7 @@ void GLFWView::initialize(mbgl::Map *map_) {
|
||||
|
||||
glfwSetWindowUserPointer(window, this);
|
||||
glfwMakeContextCurrent(window);
|
||||
glfwSwapInterval(1);
|
||||
|
||||
int width, height;
|
||||
glfwGetWindowSize(window, &width, &height);
|
||||
@@ -274,12 +275,6 @@ int GLFWView::run() {
|
||||
map->start();
|
||||
|
||||
while (!glfwWindowShouldClose(window)) {
|
||||
if (map->needsSwap()) {
|
||||
glfwSwapBuffers(window);
|
||||
map->swapped();
|
||||
fps();
|
||||
}
|
||||
|
||||
glfwWaitEvents();
|
||||
}
|
||||
|
||||
@@ -303,7 +298,9 @@ void GLFWView::notify() {
|
||||
}
|
||||
|
||||
void GLFWView::swap() {
|
||||
glfwPostEmptyEvent();
|
||||
glfwSwapBuffers(window);
|
||||
map->swapped();
|
||||
fps();
|
||||
}
|
||||
|
||||
void GLFWView::notifyMapChange(mbgl::MapChange /*change*/, mbgl::timestamp /*delay*/) {
|
||||
|
||||
Reference in New Issue
Block a user