Hi Benjamin,

We have improved Qt integration checked into svn/trunk as part of the
new osgQt library.  Submissions would be best built upon this new work
rather than introducing yet another variation of Qt integration.

Cheers,
Robert.

On Thu, Jan 20, 2011 at 9:42 PM, Benjamin Wasty <[email protected]> wrote:
> Hi,
>
> I worked on a Qt-widget integration for my university based on the Delta3D 
> files posted earlier by David Guthrie. I made a few changes - mainly to make 
> multi-threaded rendering really work.
> We'd be willing to make a submission if there's interest. My current version 
> is attached - feedback would be welcome as this is the first time I worked 
> with OSG.
>
> Below are some details and open issues:
>         The class QtViewer inherits from osgViewer::Viewer and 
> OSGAdapterWidget. It does some setup and calls frame() in its updateGL() 
> method.
>
>         Context sharing between Qt and OSG didn't work when OSG was running 
> multi-threaded - in the end (after quite a few hours of debugging) I just 
> 'switched' the two contexts in OSGAdapterWidget - the QGLWidget keeps its 
> original one and the additional one created in threadedInitializeGL() is used 
> by the OSG draw thread (OSGGraphicsWindowQt directs the 
> makeCurrent/doneCurrent()-calls to that context).
>
>         Improved mapping from Traits/osg::DisplaySettings to QGLFormat
>
>         Removed QtGuiWindowSystemWrapper and GLWidgetFactory because we don't 
> need them (but only commented out)
>
>         No rendering when Widget is hidden (otherwise some access violation 
> occurs)
>
>
> One remaining problem is that there is quite a lag when the main window is 
> moved or resized, because Qt apparently doesn't have enough time to render 
> fluently due to the blocking caused by vsync. Increasing the interval for the 
> update timer helps, but reduces the framerate and in my opinion the now used 
> 10ms are already too much.
> Should the frame()-call maybe moved to a separate thread like there:
> forum . openscenegraph . org / viewtopic.php?p=17387#17387  ? (2 posts before 
> I can post URLs? I don't have time for that...)
>
> A quick test with that code didn't work, but I didn't pursue it further so 
> far.
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=35820#35820
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to