Hey, are there any known rules for getting non-stalling calls to glReadPixels with PBOs (on nvidia hardward, 186.18 drivers).
My code is:
bind a read FBO.
attach the texture to the FBO.
set the read buffer to the FBO attachment.
bind the PBO
call glReadPixels, requesting GL_BGRA channel order.
If I ask for GL_FLOAT as the data type, the call stalls, even if the texture is 32- bit float format. If I ask for unsigned bytes, then it doesn’t stall.
Even if I call glFinish() before the ReadPixels call, it still stalls.
Either way, I’d hope the data conversion could be done asynchronously…
Try GL_RGBA when you working with float or integer and GL_BGRA when you working with 8bit/channel.
Im not sure in this, but I remember some old test which was faster in GL_RGBA mode when fbo texture was integer.
If you want to copy 32bitRGBA to rgba32f using glReadPixel, dont count on on the fly conversion. Better render in rgba32f texture and read as GL_FLOAT.