Make sure we call _cogl_draw_buffer_flush_state() before glReadPixels() to be sure we have bound the correct framebuffer.