The problem is that when I read depth buffer and color buffer the images I get are horizontaly displaced with respect to each other.
I draw the scene in the back buffer, and than I do:
glReadPixels (0, 0, m_myRect.right, m_myRect.bottom, GL_RED, GL_UNSIGNED_BYTE, frameBuffer);
glReadPixels (0, 0, m_myRect.right, m_myRect.bottom, GL_DEPTH_COMPONENT, GL_FLOAT, ZBuffer);
It is done under Windows.
Does anybody have an idea what might be the problem?