How to make a screen capture utility in photon1.14?

How to make a screen capture utility in photon1.14?
I’ve managed to create a region and capture all draw events, but how to
redirect the draw commands I get to my app’s draw buffer and draw it to the
shared memory?
Or is there a completely other way to capture a screen not using any
regions?
Maybe anyone has a snapshot utility source code?
Any help is greatly appreciated.
Thanx in advance.