[Qt-interest] Performance issues with Graphics View Framework
Constantin Makshin
dinosaur-rus at users.sourceforge.net
Tue Jul 21 13:29:25 CEST 2009
On Tue, 21 Jul 2009 14:15:52 +0400, Enrico Ros <enrico.qt at email.it> wrote:
>> 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.
OpenGL uses 4x4 matrices, so it would be 64 bytes. Still less than 80. :)
Simone can go even further than you suggest and have even more impressive
savings by using a simple vertex shader and passing only 1 (one!) float to
it. :D
But I think changing texture coordinates directly is enough for Simone's
needs.
--
Constantin "Dinosaur" Makshin
More information about the Qt-interest-old
mailing list