z coords

In a post I found this function:


def getPixelDepth(x,y):
z = BGL.Buffer(BGL.GL_FLOAT, [1])
glReadPixels (x,y, 1, 1,
GL_DEPTH_COMPONENT, GL_FLOAT, z);
print “value from depth buffer is”,z
return z[0]


returns, in blender 2.49, z for the pair (x, y) of screen coords.

is that correct?, how I translate it to 2.5?