Reading Pixels Before Clearing

Hello. I’m writing a small full-screen glut program that uses the image of the desktop as a background. Basically, I’m trying to make the window transparent. I get this image of the desktop by doing glReadPixels() before clearing the buffer. But, when I try to do this using double buffering, the image comes up black. When I use single buffering, it shows up perfectly. Any ideas? Is this a buffer problem?

You might be reading from the wrong buffer. Use glReadBuffer(GL_FRONT) before doing the readpixel operation.

Thanks, that was it.