Original Post
I have set one FBO: 2 color texture attachments 1 depth texture attachment I can display those textures and its all ok. Now I want to read the depthbuffer with glReadPixels but it fails. Also Im using PBO for async copying. Here is some code: GLuint attachments[4] = { GL_COLOR_ATTACHMENT0_EXT, GL_COLOR_ATTACHMENT1_EXT, GL_COLOR_ATTACHMENT2_EXT, GL_DEPTH_ATTACHMENT_EXT }; glBindBuffer(GL_PIXEL_PACK_BUFFER_EXT, pbo[3]); glReadBuffer(attachments[3]); glReadPixels(0,0,width,height,GL_DEPTH_COMPONENT, GL_FLOAT, BUFFER_OFFSET(0)); glBindBuffer(GL_PIXEL_UNPACK_BUFFER_EXT, pbo[3]); return (float*) glMapBuffer(GL_PIXEL_PACK_BUFFER_EXT, GL_READ_ONLY); Do I need to bind the FBO? This code works for mapping a colorbuffer (with some minor changes). Thanks