Hi Carsten,

On 27 August 2012 11:57, Carsten Scharfe <cscha...@dspace.de> wrote:
> Both views share the same context. This context is created first, with no
> inherited window data.
>
> When I create a new view, I create a new context for this view and set the
> sharedContext member
>
> to the shared context. I set the inherited window data too for embedding the
> view in the desired window.

I think you are a little confused by what is a context and what is a
shared context.  You description implies that you have two graphics
context, the second graphics context sharing OpenGL objects with the
first context (this is what a shared context means), but is still a
separate graphics context.

It could be that there is an issue with the viewer setup, but equally
is could be an issue in the OpenGL driver with sharing GL objects
between contexts.

Personally I would avoid sharing contexts historically has been be
problematic with some drivers, and brings up limitations in the way
that you can use the OSG i.e. you can't use it multi-threaded and you
have to be careful about cleanup.  The OSG can handle multiple
contexts just fine, just don't set the sharedContext info when setting
up your new context.  Alternatively just share the same graphics
context with both view's viewports on the same window - this approach
will lead to the best performance.

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

Reply via email to