[Qt-interest] Performance issues with Graphics View Framework
Enrico Ros
enrico.qt at email.it
Tue Jul 21 12:15:52 CEST 2009
On Tuesday 21 July 2009 11:41:28 Constantin Makshin wrote:
> Your animation method is very "GPU-unfriendly".
>
> Since all widget handling (including drawing) is done on CPU, their
> off-screen buffers are stored in RAM. If you use the default graphics
> system, which is not hardware-accelerated, then pixmaps are also stored in
> RAM and your QWidget<->QPixmap copy operations are relatively cheap. But
> if you mix hardware- and software-accelerated things, e.g. QGLWidget and
> software QPixmap-s, then you do a lot of RAM<->VRAM copy and probably
> image processing (conversion between CPU and GPU formats, etc.) operations.
On linux the default graphicssystem is "native" so X11 based and QPixmaps are
in video memory. However what you say still apply ;-)
> If you want to use available hardware acceleration, then do what Enrico
> suggests (load the image as a texture and scroll it by modifying texture
> coordinates). Updating 4 vertices is MUCH cheaper than uploading new image
> to VRAM (assuming each vertex has 3 coordinates (x, y, z) and 2 texture
> coordinates (s, t), 4 vertices'll occupy only 80 bytes).
Yes, and he could go even further, by using a vertexbuffer with the data and
just scrolling the texture matrix :D 1 operation ~ 16 bytes ;-) Impressive
savings.
Enrico
--
--
Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f
Sponsor:
VOGLIA DI VACANZE?
* Vieni nei Riccione Family Hotels, gli alberghi specializzati per le vacanze dei bambini! Prenota online le nostre offerte!
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid62&d!-7
More information about the Qt-interest-old
mailing list