Hi, I am developing a cross platform application for displaying pen input. The 
project requires real-time rendering of digital ink (stylus input) and hence 
the latency of the rendered strokes is very important. To render the strokes I 
am using a custom QQuickItem together with QSGRenderNode. Unfortunately, 
drawing the ink results in significant latency as the input is rendered with 
some delay (e.g. comparing it to something like OneNote I would say there seems 
to be around 10-15ms more delay). I came across a previous mail thread here 
https://lists.qt-project.org/pipermail/interest/2014-March/011692.html where it 
is mentioned that this is largely due to VSync and it's possible to disable 
this by calling QSurfaceFormat::setSwapInterval(0). This works well and reduces 
the latency significantly, unfortunately it also introduces another problem: 
the render loop for the Qt Quick scenegraph must be set to "basic" otherwise 
QML animations go a bit crazy.

My application requires that some of the ink to be rendered when the user is 
scrolling a large canvas (for which I am currently using Flickable), but using 
the basic render loop results in the animation being quite jerky (so scrolling 
is not smooth at all) as while the strokes are rendered the animation system is 
stopped (at least this is my understanding). Is there a way to overcome what I 
described? I only require the app to be in "low-latency" mode while the user is 
drawing on the screen and for all other scenario I would like to stick with the 
threaded render loop.


Best,

Daljit
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to