I have to get the color of a pixel from a texture without displaying it.

how can I do this?


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.

Another solution is to just keep a copy of the texture in system memory.

also glGetTexImage(…) may not be the fastest method though