[Prev] Thread [Next]  |  [Prev] Date [Next]

glTexSubimage and glReadPixels slower than expected Nico Becherer Tue Apr 01 12:04:00 2008

I noticed some strange timing behaviours when using glReadPixels.

Say you create a texture (Rectangle_ARB, RGBA, Float) with a size of  512 x 512 
pixels (using glTexImage2D). Then you render something to  the first line of 
that texture (viewport would be 0, 0, 512, 1) using  a framebuffer and after 
that you read your results with glReadPixels.  But you are only interested in 
the first line - so you are just  reading that first line.

This is very very slow. In contrast, if the initial texture has a size  of 512 
x 1 and you do exactly the same - glReadPixels is fast as it   should be. 
Nothing was changed besides the size of the original texture. Is that a normal 

BTW: The same effect happens when uploading data through glTexSubImage2D. The 
speed of the call depends on the size of the original texture and not (as one 
would expect) on the amount of data that is read or written. Again - is this a 
normal behaviour? And if not - is there a workaround?

        Greetings, Nico
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      ([EMAIL PROTECTED])
Help/Unsubscribe/Update your Subscription:

This email sent to [EMAIL PROTECTED]