How to make a screen capture utility in photon 1.14?

How to make a screen capture utility in photon 1.14?
I managed to make a region and capture all draw events, but how to redirect
the draw commands I get to the draw buffer of my application?
Or is there another way to capture a screen in photon?
Maybe anyone has the snapshot utility source code?
Any help is greatly appreciated.
Thanx in advance…