I added threading to mine, which works as long as you declare the thread class in the main, but still doesn't solve the problem of user control that I have been having. Anyone have any more ideas?
Thanks, -John -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Tuesday, January 16, 2007 4:11 AM To: osg users Subject: Re: [osg-users] Adding threading to QOsgWidget Hi Ben, In the CVS version of the OSG there are QT3 and QT4 examples which are associated with the new osgViewer library. The osgsimpleviewerQT3, osgsipleviewerQT4 are the examples to look at. These are based on the osgViewer::SimpleViewer class, this class doesn't support threading in itself. Yesterday I had a bash at porting osgsimpleviewQT3 across to running multi-threaded, liking up the QT windows to the osgViewer::Viewer class. osgViewer::Viewer is more similar to osgProducer::Viewer and fully supports multi-threading. Alas I wasn't able to get things to work on this first pass, QGLWidget::makeCurrent() always reported errors on attempts to make the graphics context current. I don't know yet what was wrong, but it *should* be possible, perhaps it'll just take a little tweak in QT setup. For the 1.3 release its my plan to incorporate QT support into osgViewer in a loosely coupled way - as a pure header implementation, so if you want to use QT you just use this custom QGLWidget and couple it with SimpleViewer, Viewer or CompositeViewer. The other way to use things would be to have some windows run by QT and some by the osgViewer's inbuilt windowing support, the later is able to create windows and run them multi-threaded. Robert. On 1/15/07, Ben Cain <[EMAIL PROTECTED]> wrote: > > > > > All, > > > > Is there an example (or even hints) showing the proper way to add > threading to the QOsgWidget class developed by Gazihan Alankus? See > the method > QOsgWidget::paintGL() and it's calls to osgUtil methods: update(), > cull(), and draw(). > > > > I'd prefer to use QThreads if possible. > > > > I've looked through the Producer code and it's usage of threads (e.g. > Camera, RenderSurface). But, QOsgWidget isn't based upon Producer. > > > > Thanks in advance, > > Ben > > > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.432 / Virus Database: 268.16.11/627 - Release Date: > 1/15/2007 > 7:54 AM > > _______________________________________________ > osg-users mailing list > [email protected] > http://openscenegraph.net/mailman/listinfo/osg-users > http://www.openscenegraph.org/ > > _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/ _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
