OGL Tgeomanger command line save

I know I can save gif/jpg/png etc from the OGL viewer. How do I execute the same command from within the program file?

Chris

Try:

TGLSAViewer * v = (TGLSAViewer *)gPad->GetViewer3D();
v->SavePicture(“a.gif”);

Console window should not overlap gl-viewer window, or it’ will be in picture.