Thanks JS, changes now merged and submitted to SVN.

In testing I noticed that the file number doesn't increment anymore, I
just get screen_shot_0.jpg.  Previosly it'd increment the screenshot
number on each press.  Is this intended?

Robert.

On Thu, Jul 17, 2008 at 8:34 PM, Jean-Sébastien Guay
<[EMAIL PROTECTED]> wrote:
> Hi Robert,
>
>> I've merged your new handler.
>
> Excellent! :-)
>
>>  o  I've changed the image filename to "screen_shot_" but this really
>> should be customizable.
>
> Changes attached so that the CaptureOperation is passed in the constructor
> of the ScreenCaptureHandler (default 0 = default CaptureOperation). This
> way, you can do:
>
>  viewer.addEventHandler(new osgViewer::ScreenCaptureHandler(
>    new osgViewer::WriteToFileCaptureOperation("filename", "jpg")));
>
> and the filename will be what you want. The WriteToFileCaptureOperation will
> add the context ID and the file number (if in SEQUENTIAL_NUMBER mode) to the
> file name.
>
> (The attached also clarifies some notify messages, and corrects the comment
> when adding the handler in osgviewer.cpp)
>
> I also remembered, the current architecture could allow a different
> CaptureOperation for each context, but currently the API only allows setting
> one CaptureOperation for all contexts. This could be improved if need be.
>
>>  o The PBO functionality is only really useful when your are
>> streaming data, such as when recording
>>     a video, its performs worse when you use it just for a single
>> screen shot, here glReadPixels wins.
>
> OK, interesting. Is the performance what you would expect on your side?
>
> Any comments on the JPG plugin writing the alpha data? I would have thought
> it would see that the image is GL_RGBA and only write the RGB since it does
> not support alpha...
>
> As for the default file type to write to, I did some tests, and JPG and TIF
> take about the same time for me (~60ms total, including file write) and PNG
> takes almost 3 times as much (~160ms). So I think JPG is a good choice,
> though it doesn't support alpha. Another option would be to do the write in
> a separate thread. What do you think? (of course, this could be left as an
> exercise for the reader, to make their own CaptureOperation that writes in a
> separate thread...)
>
> Thanks,
>
> J-S
> --
> ______________________________________________________
> Jean-Sebastien Guay    [EMAIL PROTECTED]
>                               http://www.cm-labs.com/
>                        http://whitestar02.webhop.org/
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to