[osg-users] Draw thread per opengl context instead of per GraphicsContext

Robert Osfield robert.osfield at gmail.com
Fri Nov 10 00:58:14 PST 2017


Hi Ben,

Neither the OSG or OpenGL can provide thread safe sharing of GL
objects when sharing contexts.  If you want to run multiple context
with multiple threads you will have to keep these contexts
independent.

Robert.

On 9 November 2017 at 14:23, Ben Meijering <bmeijering at tree-c.nl> wrote:
> Hi everyone,
>
> I want to use the GraphicsContext::Traits::sharedContext to render multiple views (in multiple windows) that share the same context.
>
> I already read on some forums that the ThreadingModel::SingleThreaded  should be used.
>
> However, I would still like to use ThreadingModel::DrawThreadPerContext so that the cull and draw thread can overlap.
>
> I tried this, but a draw thread is created per GraphicsContext and thus per window. Because all these windows share an opengl context, I would have expected that only 1 thread would have been created.
>
> This results in all sorts of problems.
>
> Is there a way in which I can use 1 draw thread per opengl context ?
> And, if not, is this something that I can easily change by modifying the code ?
>
> Thank you!
>
> Cheers,
> Ben
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=72344#72344
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


More information about the osg-users mailing list