[osg-users] Image capture in memory

Trajce Nikolov NICK trajce.nikolov.nick at gmail.com
Wed Apr 24 02:27:34 PDT 2019


Hi Catalin,

I don't have build env at the moment but looking into the code, can you try
this:

osgposter.cpp, Ln: 377
just add:
viewer_camera->setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);

this shouldn't open any window

On Wed, Apr 24, 2019 at 11:12 AM Catalin Flower <inbox.icf at gmail.com> wrote:

> Hi Alberto,
>
> This example is half baked as I see it:
>
> if you run it:
>
> osgposter.exe cow.osg --inactive --use-pbuffer
>
> --inactive - suppose to be without windows but it creates a window anyway
> --use-pbuffer still creates a window
>
> This is the code path that I tried to import in my app but no image is
> generated and it creates a black .bmp image.
>
> if you run it:
>
> osgposter.exe cow.osg
>
> if you can see the cow in a window and you can press 'P' and it captures
> an image fine to the disk
>
> I need a simple example to capture an image off-screen without any windows
> popping up on screen. This is a basic feature that should be simple
> implement and understand.
>
> Does OSG even support such a basic feature?
>
>
> Thank you!
>
> Cheers,
> Catalin
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75884#75884
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


-- 
trajce nikolov nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20190424/682cc72f/attachment.html>


More information about the osg-users mailing list