[Interest] QtQuick2 image rendering and custom shader overhead

Preet prismatic.project at gmail.com
Sat May 4 20:30:56 CEST 2013


Hi,

I have a couple of questions regarding images in QtQuick2.

1.
For a resolution independent application, I tried using several images (all
128x128px) that I scaled as appropriate for target devices. In QtQuick1
this didn't work out so well -- scaling the images was expensive and made
the application slow.

Can I expect image resizing/drawing to be much faster in QtQuick2? If the
images are directly uploaded as textures to OpenGL without being scaled
down CPU-side I'd imagine this to be the case.

2.
I'd like to use ShaderEffects to apply a somewhat trivial shader to most of
the images in my application. The images are black and white icons, and I'd
like to use shaders to change the black and white output fragments to
different colors (ie maybe blue and green, red and yellow, etc).

The shader itself is super simple and probably adds negligable cost to the
pipeline, but I'm concerned about how overall performance would be affected
compared to the default method QtQuick uses to render a bunch of images.

Would QtQuick still intelligently batch the images and draw them using only
a few calls? Or would it individually bind the same shader and issue a
separate draw call for each image?


Preet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130504/101de021/attachment.html>


More information about the Interest mailing list