Copy display buffer to texture

I want to copy the contents of the display buffer to texture memory. So I can draw it back again with filtering, zoom and rotation. How do I do this ?

Thank for any help Mike

You can read the entire colour buffer, with the read pixels function.

Create a buffer the size of you screen.
unsigned char image[widthheight*3];
then read the pixels
That should do it, take a look at this function, though it is what you want I may have something slightly wrong.


If you want speed, you’re probably better using glTexCopySubImage.