summaryrefslogtreecommitdiff
path: root/platform/glfw/glfw_view.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/glfw/glfw_view.cpp')
-rw-r--r--platform/glfw/glfw_view.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/platform/glfw/glfw_view.cpp b/platform/glfw/glfw_view.cpp
index cd979822c4..91e2345bb6 100644
--- a/platform/glfw/glfw_view.cpp
+++ b/platform/glfw/glfw_view.cpp
@@ -91,15 +91,6 @@ GLFWView::GLFWView(bool fullscreen_, bool benchmark_)
}
glfwSetWindowUserPointer(window, this);
- glfwMakeContextCurrent(window);
- if (benchmark) {
- // Disables vsync on platforms that support it.
- glfwSwapInterval(0);
- } else {
- glfwSwapInterval(1);
- }
-
-
glfwSetCursorPosCallback(window, onMouseMove);
glfwSetMouseButtonCallback(window, onMouseClick);
glfwSetWindowSizeCallback(window, onWindowResize);
@@ -109,7 +100,7 @@ GLFWView::GLFWView(bool fullscreen_, bool benchmark_)
glfwGetWindowSize(window, &width, &height);
- backend = std::make_unique<GLFWGLBackend>(window);
+ backend = std::make_unique<GLFWGLBackend>(window, benchmark);
pixelRatio = static_cast<float>(backend->getSize().width) / width;
@@ -585,8 +576,6 @@ void GLFWView::run() {
rendererFrontend->render();
- glfwSwapBuffers(window);
-
report(1000 * (glfwGetTime() - started));
if (benchmark) {
invalidate();