Skip to content
  • 0 Votes
    5 Posts
    755 Views
    SGaistS

    It should be supported indeed. Did you try with a more recent release of Qt ? Like 5.15 or even 6.2 ?

  • 0 Votes
    24 Posts
    6k Views
    R

    @mcleary @Patterson

    Its been a long time since this thread was started but I think it makes sense to post the updates here. I put together a basic project with native OpenGL and also using Qt's QOffscreenSurface and QWindow classes.

    The github repository can be found here:

    https://github.com/rtavakko/VSync

    In this setup there is a single renderer that render to an FBO texture using its own thread and 3 display windows that share the GUI thread with all of them sharing OpenGL contexts together.

    On my machine I see a clear lag with VSync on when there are 2 or more display windows. Turning VSync off clears the lag. The calcualted FPS values do not indicate any issues in either case which doesn't help but I see a clear difference when I start the application with say 2 displays and then close one of them.

    I have my internal laptop display and an RCA RT1970 (both running at 1920x1080 - 60Hz) and both connected to my integrated Intel HD 530 GPU. My discrete GPU is an NVIDIA GeForce GTX 950M and I'm running Qt 5.12.0 MSVC2017 64 bit.

    I'll dig in further myself also with other machines but if anyone has any ideas on what could be causing this, it would really help debug further.

    Cheers!

  • Context2D and V-Sync

    Unsolved QML and Qt Quick
    1
    0 Votes
    1 Posts
    677 Views
    No one has replied
  • 0 Votes
    12 Posts
    6k Views
    kshegunovK

    @Chris-Kawa
    Fair enough. Thanks for taking the time.

    Cheers!

  • 0 Votes
    2 Posts
    2k Views
    R

    Additional info:

    When I place a QThread::usleep(16667) inside the rendering loop, and create the window with QSurfaceFormat::setSwapInterval(0) (no vertical sync), the rendering runs smoothly at no noticeable GPU load. With vertical synchronisation switched on (setSwapInterval(1)), there are in fact not more than 60 fps rendered, but the GPU is heavily working on something.
    The same occurs on another system (Qt Creator Community OpenGL, mingw, Win32, Intel Q6600, VGA AMD 3850). Can anyone confirm this?

  • 0 Votes
    5 Posts
    4k Views
    A

    It depends if it's a Qt Quick application or not. If you are using widgets or doing your own custom OpenGL rendering then there will be no problem. The issue with Qt Quick is that it has its own animation system which gets driven by the default 16.66 ms on platforms where it fails to query the real refresh rate from the system. Run with QSG_INFO=1 to verify the actual value that is in use. (NB Qt 5.5 has some improvements in this area - https://bugreports.qt.io/browse/QTBUG-44971 - so it is now able to retrive the correct refresh rate on embedded platforms too)