I want to re-open this discussion because it comes up regularly and I think
it's important to address.  Sure it's easier to avoid mixing, but combining
osg with toolkits such as Qt Quick/QML can create very powerful and
beautiful user interfaces.  The marriage of the two can create great things.

We've got a pretty good state saver now, but it apparently doesn't work
perfectly to keep both toolkits happy.  We're close.  What I've seen is
lighting is not restored completely, and there is an issue with texture
coordinates.  It's been suggested that for performance reasons, we let OSG
handle the context and do the 3rd party toolkit drawing in pre/post
callbacks.  This might help with multi-threaded rendering, but doesn't
address the state issue.

Performance aside, is there something that can be done to insure that OSG is
given an OpenGL state that it is happy with?  At some point, OSG is given a
virgin OpenGL state and is forced to set the state as it wishes.  I'd be
more than happy to sacrifice performance if multiple rendering toolkits
could co-exist.

John



On Tue, Jun 15, 2010 at 8:13 AM, Robert Osfield <robert.osfi...@gmail.com>wrote:

> Hi Martin,
>
> Mixing OpenGL apps/toolkits with the OSG requires one to be very
> careful about the state both the OSG side and the other OpenGL code
> side to make sure that neither interfere with each other.  I've
> written about the issues plenty of times on osg-users so have a trawl
> through the archives.  In general I would just recommend trying to
> avoid mixing is it certainly makes for an easier life alround.
>
> Robert.
>
> On Tue, Jun 15, 2010 at 2:05 PM, Martin Scheffler <osgfo...@tevs.eu>
> wrote:
> > Some notes: The captureCurrentState command never catches any states. In
> OSG head, the camera does not even have a state.
> >
> > The push/popClientAttribute method causes problems with terra page
> terrain rendering. When I include it, the GUI looks good, but the terrain is
> screwed up. Adding glEnableClientState(GL_VERTEX_ARRAY) makes the terrain
> visible, but the texture coordinates seem to be broken.
> > When I don't include the client attribute stuff then the Qt GUI becomes
> warped at some specific camera angles. Any ideas?
> >
> > Thank you!
> >
> > Cheers,
> > Martin
> >
> > ------------------
> > Read this topic online here:
> > http://forum.openscenegraph.org/viewtopic.php?p=28948#28948
> >
> >
> >
> >
> >
> > _______________________________________________
> > 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
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to