Posts

Showing posts from March, 2017

QNanoPainter with Qt 5.8 (and QSGRenderNode)

Image
QNanoPainter recently gained initial support for QSGRenderNode which is a new public class available starting from Qt 5.8. What this means is that instead of rendering through FBO using QQuickFramebufferObject so, OpenGL drawing is done directly into Qt Quick Scene Graph. And as a QQuickItem somewhere in the middle of scene, not just underlay/overlay for the scene which was already possible before Qt 5.8 using beforeRendering & afterRendering.

Below is a video running QNanoPainter tester app on MacBook Pro with 16 unique QQuickItems using QSGRenderNode mode:



So should you enable QNANO_USE_RENDERNODE with your custom QNanoPainter items?

There is a potential performance gain for not rendering through FBO. Especially if your UI contains many custom items and/or you resize items, QSGRenderNode may give more gains as FBO resizing can be costly.However, based on my testing with few different Android devices the performance difference seems pretty small, just few percentages. Maybe with s…