PDA

View Full Version : framebuffer



celic
05-08-2002, 04:19 AM
I have to get the color of a pixel from a texture without displaying it.

how can I do this?

thanks.

Bob
05-08-2002, 04:43 AM
Assuming you use double buffering, you can render it to the back buffer and read it from there. In double buffered mode, only the front buffer is displayed, so you won't see the pixel.

Humus
05-08-2002, 09:38 AM
Another solution is to just keep a copy of the texture in system memory.

zed
05-08-2002, 12:12 PM
also glGetTexImage(..) may not be the fastest method though

celic
05-08-2002, 09:49 PM
thanks!!!