Whilst these applications are information rich, yet they lack sufficient conciseness and are not right to the point sometimes. It took me hours to get what I need, and for my specific task, I just need such a simple class OsgSnapshotHelper:
void Capture(osgViewer::Viewer* pViewer, std::string outputImagePath)
OsgSnapshotHelper* osh = new OsgSnapshotHelper(pViewer);
osh = NULL;
std::cout << “Ending Capture: “ << outputImagePath << std::endl;
And here is my implementation, based on OsgAutoCapture example. I wrapped it to what I need and removed all unnecessary stuff into one single class, which would be very portable then.