[Interest] Utilizing the GPU, how to start?
sean.harmer at kdab.com
Thu Jul 7 20:11:37 CEST 2016
On 07/07/2016 07:47, Uwe Rathmann wrote:
> On Wed, 06 Jul 2016 18:10:37 +0000, J-P Nurmi wrote:
>> Interesting choice. I would have done the exact opposite. Application
>> logic in C++ and UI declaration in QML.
> Well this is actually not a choice - we did it in QML and ended up with
> a disappointing performance, because of QML. And we did it exactly like
> you recommend - we simply have a lot of UI.
So what were the results of profiling? CPU usage caused by
animations/batching, something else? GPU? Bandwidth? Lock contention?
Any test cases to help others profile it?
>> Declaring fluid animated UIs in
>> QML is a joy, writing animations in C++ is not so.
> In case of the animations QML offers a compact syntax to access a library
> of C++ classes mostly setting up a QPropertyAnimation. Using similar ( or
> even the same ) classes from C++ is not uncomfortable either.
> My experience so far is, that using Qt/Quick from C++ does not have to be
> that different from writing a widget application: creating controls,
> setting up signal/slot connections and arranging them into layouts.
> The graphic stack behind is irrelevant for the vast majority of the
> application code and I disagree with Thiago, that it is not possible to
> implement controls with a similar API as their widget counterparts.
That's not true. The CPU just isn't capable of doing lots of blending on
the number of pixels available on typical displays these days. So it
depends entirely upon the type of UI you are trying to construct. For
widget type UIs then yes you should be fine with either tech. Add in
lots of animations, transparency effects, colour grading effects etc and
you will very quickly hit limitations of CPU raster based painting.
I'm not saying Qt Quick is perfect. This is why I am asking above about
what bottleneck you experienced so that we can investigate fixing it.
It's perfectly possible to provide C++ apis, we do this in Qt 3D. It was
just chosen to not do this for Qt Quick thus far.
> Interest mailing list
> Interest at qt-project.org
Dr Sean Harmer | sean.harmer at kdab.com | Managing Director UK
KDAB (UK) Ltd, a KDAB Group company
Tel. +44 (0)1625 809908; Sweden (HQ) +46-563-540090
Mobile: +44 (0)7545 140604
KDAB - Qt Experts
More information about the Interest