glReadPixels on GL_DEPTH_COMPONENT

I am using OpenGLES3 on an iPhone6.

When I try to read depth values from my framebuffer, I only see value 0.


    float depth;
    glReadPixels(scrx, scry, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &depth);


I properly set my read target with:


    glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo);


And lastly, my GLKView has a retained backing, by setting kEAGLDrawablePropertyRetainedBacking to YES.


But the read operation will always return the value 0.


Can this even be done in ES3? (I did read that it was possible on Metal.)


Thanks,


Bram

glReadPixels on GL_DEPTH_COMPONENT
 
 
Q