Hi Simon,

My loop was something totally independant from the camera movement. You can 
imagine what you want with it.
And about capturing a different size, I guess no, you'll probably have to 
resize your image with your encogind API.

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/


Le Fri, 19 Dec 2008 17:57:15 +0100, Simon Loic <simon1l...@gmail.com> a écrit:

> Thanks Jean-Sebastien,
> Your reply is very helpful. I don't have the time to day to implement it but
> I will try during the next week.
> Of course I'm interested by your new ScreenCaptureHandler class. BTW do you
> think that with this approach it's possible to have a capture resolution
> different from the one of the screen?
> I will give a look to ffmpeg too.
>
>
>
>
> On Fri, Dec 19, 2008 at 4:40 PM, Jean-Sébastien Guay <
> jean-sebastien.g...@cm-labs.com> wrote:
>
>> Hello Simon,
>>
>>  Second, I tried some times ago to do an offscreen rendering but If you
>>> know an easy way in osg to do it I'm interested (I think there are ways
>>> based on osg::Camera::DrawCallBack).
>>>
>>
>> There is now (since OSG 2.6) an osgViewer::ScreenCaptureHandler which you
>> can use. Unfortunately it only responds to key presses right now, but you
>> can subclass it like this to get it to capture programmatically:
>>
>>    class OurScreenCaptureHandler :
>>        public osgViewer::ScreenCaptureHandler
>>    {
>>    public:
>>        OurScreenCaptureHandler(CaptureOperation* defaultOperation = 0)
>>           : osgViewer::ScreenCaptureHandler(defaultOperation)
>>        {
>>        }
>>
>>        /** Capture the given viewer's views on the next frame. */
>>        virtual void captureNextFrame(osgViewer::ViewerBase& viewer)
>>        {
>>            addCallbackToViewer(viewer);
>>        }
>>    };
>>
>> Then in your frame loop, you can just call
>>
>>    screenCaptureHandler->captureNextFrame(viewer);
>>
>> (note: I'll be sending a new version of ScreenCaptureHandler which includes
>> this method soon, I had to do it for our framework recently, so it will
>> probably be included in OSG after that, no need to subclass)
>>
>>  Eventually, do you know some good (easy to handle) API for compressing
>>> video?
>>>
>>
>> Once you have images of each frame, you can just use ffmpeg to compress the
>> sequence into a video. See the ffmpeg man page or web page for more
>> information.
>>
>> 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
>>

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to