Gosh, have I been struggling with this one ! I’m trying to get a pixel’s depth value by calling glReadPixels with GL_DEPTH_COMPONENT … and I can’t get it work … the documentation says that it should return a normalized depth value in the range 0.0 - 1.0 but in my case it looks to be undefined. What am I doing wrong ?


You haven’t searched the forum
Give the exact code and we’ll see.

You probably didn’t use GL_FLOAT?
Or forgot to convert Window origins from top-left to OpenGL’s bottom-left?