Original Post
Hello all, I tried to read back my depth map via glGetTexImage(). Unfortunately all the output is just black. If I render this depth map as a texture onto a quad and display it on the screen, it shows just fine (grayscale picture of depth values). ZNear and ZFar are also ok, so the generated depth values do make sense and are in a reasonable range. The depth texture is attached to an ext_framebuffer. I also tried to detach the depth texture from the framebuffer before trying to read values, but that did not help either. My call looks like glGetTexImage(GL_TEXTURE_2D, 0, GL_LUMINANCE, GL_FLOAT, &data); i also tried glGetTexImage(GL_TEXTURE_2D, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, &data); glGetTexImage(GL_TEXTURE_2D, 0, GL_RGB, GL_UNSIGNED_BYTE, &data); and various other. They don't work either. I also tried using GL_DEPTH_COMPONENT for the <format> parameter as the specs for arb_depth_texture tell me to do, but then I get a glGetError() == GL_INVALID_ENUM. This is all on a Radeon 9800 Pro with the latest Catalyst drivers. Do you think this is a driver bug or can you point out what I am doing wrong? -Matthias