From 3eca4b6fc37bba5c4204bb7716764f2d962fba60 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Fri, 1 Jul 2016 23:03:39 +0200 Subject: [PATCH] Force vsync off; fixes jittery display on the NVIDIA proprietary driver. --- main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.cpp b/main.cpp index 75ae9a7..f0f70ac 100644 --- a/main.cpp +++ b/main.cpp @@ -41,6 +41,11 @@ int main(int argc, char *argv[]) fmt.setProfile(QSurfaceFormat::CoreProfile); fmt.setMajorVersion(3); fmt.setMinorVersion(1); + + // Turn off vsync, since Qt generally gives us at most frame rate + // (display frequency) / (number of QGLWidgets active). + fmt.setSwapInterval(0); + QSurfaceFormat::setDefaultFormat(fmt); QGLFormat::setDefaultFormat(QGLFormat::fromSurfaceFormat(fmt)); -- 2.39.2