[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: Pure software rendering or hardware accelleration?



Gregor Mückl wrote:

Second, I found out that updating those textures using glTexSubImage2D() is insanely slow (40ms minimum), making it impossible to play animations fast enough on those textures.
Do you need to update all of the texture every frame?  If you can bound the
rectangular area(s) where the changes are happening and only update those, it
should go a lot faster.

Another possibility is that you've managed to provide the textures in a
format that causes the card to have to do massive data conversions on the way
into memory.  For example - don't send the textures with a 'float' for each
or R, G and B - use unsigned bytes.  Don't use the options to swizzle the data
(eg from BRG into RGB).

You could experiment with 16 bit (5/6/5) RGB formats - that cuts a third off
the bandwidth - it might help.

Now, is there a trick to optimize OpenGL texture updates? Or should I turn around and rewrite the whole rendering code to run entirely in software?
I doubt it would be faster.

---------------------------- Steve Baker -------------------------
HomeEmail: <sjbaker1@airmail.net>    WorkEmail: <sjbaker@link.com>
HomePage : http://www.sjbaker.org
Projects : http://plib.sf.net    http://tuxaqfh.sf.net
           http://tuxkart.sf.net http://prettypoly.sf.net
-----BEGIN GEEK CODE BLOCK-----
GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M-
V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++
-----END GEEK CODE BLOCK-----