I have been using the Windows API\'s BitBlt
function to perform the screen grab.
There are many drawbacks however:
OpenGL can only read the context framebuffer (a window), and any framebuffers or pbuffers you have created. OpenGL cannot touch the desktop or any other window.
This is an interesting question. Unfortunately I don't think this is really supported. I have found reports of some level of success with creating a full screen invisible window and reading the pixel data with glReadPixels:
http://www.virtualdub.org/blog/pivot/entry.php?id=142
http://www.opentk.com/node/2430
However, I believe the behavior when doing this is undefined and will only work on specific hardware/OS configurations.