Hi Philipp

On 15 June 2016 at 14:48, Philipp Meyer <[email protected]> wrote:
> figured it out.
> One needs to use
>
>
> Code:
> viewer->setReleaseContextAtEndOfFrameHint(false);
>
>
>
> to prevent the context from getting released after a frame is rendered.
> That way, its resources, like textures, can still be accessed after the frame 
> completes.

I don't have CUDA experience so can't comment on this specifically.

On the OSG side the setReleaseContextAtEndOfFrameHint() is only useful
in when you have a single graphics context and are running your
application SingleThreaded.

There will be other ways to integrate CUDA rather than via the main
loop.  You should be able to create a custom GraphicsOperation and
attach this to a GraphicsWidnow or Camera draw callback to invoke the
CUDA side from within a thread that has the graphics context current.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to