Hi Danny,
I would like to do the following:
1) To disable static counter on the output file name and alway overwrite the
last file.
2) Save this file in custom path on hard drive.
How can set these option to ScreenCaptureHandler?
If you look at the osgViewer/ViewerEventHandlers header, you'll see the
ScreenCaptureHandler constructor takes an optional CaptureOperation:
ScreenCaptureHandler(CaptureOperation* defaultOperation = 0,
int numFrames = 1);
You could implement your own CaptureOperation if you wanted, it's really
simple, but the one concrete CaptureOperation that is provided should do
what you need just by changing some default parameters. Check the
ScreenCaptureHandler::WriteToFile class:
WriteToFile(const std::string& filename,
const std::string& extension,
SavePolicy savePolicy = SEQUENTIAL_NUMBER);
So you see, by constructing a WriteToFile with your desired filename
(and path) and setting savePolicy to OVERWRITE instead of
SEQUENTIAL_NUMBER, you'll get what you want. Then just pass this
WriteToFile to the ScreenCaptureHandler constructor.
I designed WriteToFile to cater to the most common needs, and your needs
seem to fit these.
Hope this helps,
J-S
--
______________________________________________________
Jean-Sebastien Guay jean-sebastien.g...@cm-labs.com
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org