To minimize latency, your best bet would be to: 1. disable vsync, either using QSurfaceFormat::setSwapInterval(0) (since 5.3) or in the system's control panel.
2. Run your application with QSG_RENDER_LOOP=basic to turn off the threaded/window render loops. The windows/threaded render loops will rely on vsync to be throttled so if you don't set 'basic' animations will spin at 100% CPU. Qt's mouse input handling is done by posting an even to the GUI thread when the mouse/touch event comes in. This will be present in the next rendered frame. With vsync and double/triple buffering this means that frame comes to screen 0-33 ms after the event occured. Up to another 16ms delay will be added if the application is already throttled (and blocked in for instance its swapBuffer() call). Then add in any latency added by the system compositor which may or may not be another few vsyncs worth of latency. cheers, Gunnar On 24 Mar 2014, at 07:42, Damian Ivanov <damianator...@gmail.com> wrote: > Hmm 2 options Jason: > a) You are not affected by the bug but are uneducated about QML (it > should run on embedded systems and slow systems too) > b) You have some sickness about hand-eye coordination. > > 16G, FX8320 Radeon 5750 for the bug report, do we have one yet? > > > 2014-03-24 3:07 GMT+01:00 Jason H <scorp...@yahoo.com>: >> Yeap, I did that. No delay. >> >> Perhaps you need a faster computer? >> >> >> ________________________________ >> From: Damian Ivanov <damianator...@gmail.com> >> To: Jason H <scorp...@yahoo.com> >> Cc: Willem Bennekom <cumul...@gmail.com>; "<interest@qt-project.org>" >> <interest@qt-project.org> >> Sent: Sunday, March 23, 2014 1:44 PM >> >> Subject: Re: [Interest] Input Latency Issues in QtQuick >> >> go to one corner and move the mouse cursor fast diagonal to the other >> corner. you will see that sometimes the rectangle is 1cm away from >> your mouse cursor. >> >> That's called delay. >> >> 2014-03-23 16:55 GMT+02:00 Jason H <scorp...@yahoo.com>: >>> I don't have a problem with the test case. >>> AMD A6 Laptop Mint 16/64bit >>> >>> ________________________________ >>> From: Damian Ivanov <damianator...@gmail.com> >>> To: Willem Bennekom <cumul...@gmail.com> >>> Cc: "<interest@qt-project.org>" <interest@qt-project.org> >>> Sent: Saturday, March 22, 2014 6:28 PM >>> Subject: Re: [Interest] Input Latency Issues in QtQuick >>> >>> hmm I can confirm the problem with the test case, depending on what >>> application you have this can be from absolutely not important to >>> quite a deal-breaker... >>> I would fill a bug. >>> >>> 2014-03-22 23:09 GMT+02:00 Willem Bennekom <cumul...@gmail.com>: >>>> For me, the lagging is clearly noticeable on all platforms where vsync is >>>> enabled. >>>> (Macbook Pro (Nvidia), Linux/Windows Desktop with Nvidia, Windows Desktop >>>> with AMD + Angle. >>>> It hapopens with all Qt Quick versions.) >>>> >>>> Here's a minimal test scene (rectangle follows mouse): >>>> http://pastie.org/pastes/8959817 >>>> >>>> 2014-03-22 18:37 GMT+01:00 Damian Ivanov <damianator...@gmail.com>: >>>> >>>>> for the record: I can't confirm this, QML input is instantly here free >>>>> radeon driver (5series) on openSUSE 13.1 64bit. >>>>> >>>>> 2014-03-22 15:46 GMT+01:00 Willem Bennekom <cumul...@gmail.com>: >>>>>> With its current architecture, QtQuick has input latency issues: >>>>>> The scene reacts to user input with a slight, but noticeable delay, >>>>>> which >>>>>> makes >>>>>> QtQuick apps feel clumsy and unpleasant to use. >>>>>> >>>>>> I guess this is related to vsync handling, where input events don't >>>>>> immediately >>>>>> trigger a repaint while the render thread waits until the framebuffer >>>>>> is >>>>>> swapped. >>>>>> >>>>>> The only exception are Windows platforms with native OpenGL on ATI >>>>>> cards, >>>>>> where the framerate seems to be uncapped: >>>>>> The rendering is super responsive, almost like Qt Widgets. >>>>>> The drawback is that render thread animators are broken, as they >>>>>> aren't >>>>>> synced to 60 Hz. >>>>>> >>>>>> 1. Is there a way to hack Qt to get this Windows+OpenGL+ATI rendering >>>>>> behavior on all platforms? >>>>>> Maybe some tweaks in qsg*renderloop.cpp? >>>>>> >>>>>> 2. Are there plans to implement a rendering scheme that reduces input >>>>>> latency? >>>>>> >>>>>> Thanks >>>>>> Willem >>>>>> >>>>>> _______________________________________________ >>>>>> Interest mailing list >>>>>> Interest@qt-project.org >>>>>> http://lists.qt-project.org/mailman/listinfo/interest >>>>>> >>>> >>>> >>> _______________________________________________ >>> Interest mailing list >>> Interest@qt-project.org >>> http://lists.qt-project.org/mailman/listinfo/interest >>> >>> >> >> > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest