PDA

View Full Version : Reading Pixels Before Clearing



Ty
12-11-2004, 06:02 AM
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?

def
12-11-2004, 08:17 AM
You might be reading from the wrong buffer. Use glReadBuffer(GL_FRONT) before doing the readpixel operation.

Ty
12-11-2004, 02:10 PM
Thanks, that was it.