glTexImage2D

Hello !

I’ve read many post on this forum
about the bad perfs of glReadPixel,
more generally about all the transfer
to video memory.
What about glTexImage2D ? Is this function
as slow as glReadPixel ? More generally,
is it possible to generate new texture
at each frame at a reasonnable frequency ?
Are there extensions like (sthg)_range
that could speed up the thing ? Has
anyone already done such thing ?

Thx for all your advices and comments

escondida

About glReadPixels : it is slow because it retrieves data from the graphics card, which is not designed to send data back to the host; it is designed to receive and process data.

About dynamic textures : use glTexSubImage instead of glTexImage. You won’t achieve very high performance if you use large dynamic textures, though.
At the moment, there is no multi-vendor extension for efficient dynamic texturing. For NVIDIA chips, there is NV_pixel_data_range.