From: Steinar H. Gunderson Date: Fri, 1 Jul 2016 21:03:39 +0000 (+0200) Subject: Force vsync off; fixes jittery display on the NVIDIA proprietary driver. X-Git-Tag: 1.3.1~2 X-Git-Url: https://git.sesse.net/?p=nageru;a=commitdiff_plain;h=3eca4b6fc37bba5c4204bb7716764f2d962fba60 Force vsync off; fixes jittery display on the NVIDIA proprietary driver. --- 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));