Off-screen frame buffer

I want to render something into a frame buffer while I did not want the buffer to be displayed on the screen. And I want to read the contents of buffer to my system memory.

How can I implement it?


I think you can simply request in the pixel format that you want to render to an offscreen buffer. It is even easier using Glut. The thing is that I am not sure if you will get HW accelaration when doing that.


You can request double buffering and draw to the back buffer (which is hidden). Then use glReadPixels to fetch the buffer into your system memory. It is fairly slow to do this, but it does exploit hardware acceleration. There really isn’t a fast way to do this today with most available video cards.