Howto create a Texture out of backbuffer?

Hi there!

I want to create a texture out of my Backbuffer and really dont know how to do this.
I know that it should work with copyteximage2d, but I?m new to Opengl, and I dont know how to allocate the needed memory and so on…

It would be really kind if anybody could post a snippit working code, otherwise I?m afraid I wont understand it :slight_smile:

mfg Susanne

You don’t have to allocate data space as the function you wrote copies directly to a texture…
To copy to a memory region use glCopyPixels