Read pixels from framebuffer in opengl ES
I’m trying to read pixel data from GL_READ_FRAMEBUFFER
with glReadPixels()
but it returns all 0.
Read pixel data from GL_TEXTURE_2D_ARRAY
Is it possible to read the pixel data from GL_TEXTURE_2D_ARRAY
? I’ve binded the image before with glBindTexture(GL_TEXTURE_2D_ARRAY, frameIn.DepthTexture)
and I wanted to read the pixel data as an array. I’ve tried functions like glReadPixels
or glTexSubImage3D
but they don’t seem to work, and I’m wondering either if I’m doing something wrong or it’s not possible at all.