]> git.sesse.net Git - nageru/commitdiff
Force vsync off; fixes jittery display on the NVIDIA proprietary driver.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 1 Jul 2016 21:03:39 +0000 (23:03 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 1 Jul 2016 21:42:58 +0000 (23:42 +0200)
main.cpp

index 75ae9a7f7cbfa6354d7c7553dfa28070d89cfab7..f0f70ac8c71b3084284cac4a445fa1332d776178 100644 (file)
--- 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));