Alternative for glReadPixels()?

Hi,

since…

glReadPixels( x, y, w, h, GL_DEPTH_COMPONENT, GL_FLOAT, buf );

…does not work here for multisampled packed depth-stencil
renderbuffers (I guess it is a driver bug) I need an
alternative. Any idea?

Thanks!

Use a depth-stencil texture, bind it to a texture unit in a full-screen-quad render pass where you read out the depth and write that as the fragment out.

Shame to waste the time, but driver bugs – what can you do? I’m assuming you’ve already tried updating your driver.

And I’m assuming you don’t just need the depth as input to a shader in a future pass, in which case you might be able to use the depth-stencil texture directly.

Yeah I have the latest driver installed.
Also talked to the NVidia guys and
submitted in parallel a bug report
on their website… no answer yet
but I hope within the next weeks.