I can't seem to read the depth buffer values in OpenGL ES2 on iOS 4.3
afDepthPixels = (float*)malloc(sizeof(float) * iScreenWidth * iScreenHeight);
glReadPixels(0, 0, iScreenWidth, iScreenHeight, GL_DEPTH_COMPONENT, GL_FLOAT, afDepthPixels);
My depth buffer is currently bound in place and operational, however that function reads nothing but 0 values, and it seems to return almost immediately. If I give it a GL_RGBA, it will take quite a while, and will indeed return results. Is this functionality just not supported in ES2 on iOS?
Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…