https://vec.io/posts/faster-alternatives-to-glreadpixels-and-glteximage2d-in-opengl-es
In the development of Shou, I’ve been using GLSL with NEON to manipulate image rotation, scaling and color conversion, before send them to video encoder.
So I need a very efficient way to transfer pixels between OpenGL and memory space. TheglTexImage2D
and glReadPixels
performance are very unacceptable, especially for some specific vendors, e.g. Samsung Galaxy devices with Exynos chip.
Compared to glTex(Sub)Image2D
, the glReadPixels
is the real bottleneck, which blocks all OpenGL pipeline and results in about 100ms delay for a standard 720P frame read back.
Her