Hi Jonas, This is most certainly a bug, which I'm delighted you've picked up - its now fixed and checked in to SVN ;-)
The problem is that _threadsRunning was an uninitialized variable, something I obviously missed in dev of 2.0, probably due to this variable being a later addition. I've just gone through CompositeViewer and can't spot any more uninitialized variables. I'll go a double check the other Viewer classes as well. Robert. On 7/9/07, Jonas Dehlin <[EMAIL PROTECTED]> wrote:
Hi, I have a problem with CompositeViewer. I've tried to get the osgcompositeviewer example running in a threaded mode, but when I select a thread model different fom SingleThreaded (ThreadPerCamera or ThreadPerContext), the example still only runs with one thread. After examining the code in CompositeViewer.cpp, I've found that the _threadRunning variable is not initialized by default. So I made a new class, inheriting from CompositeViewer, where I set _threadsRunning to false and now it works. The code I wrote is the following: #ifndef _NEWCOMP_H_ #define _NEWCOMP_H_ #include <osgViewer/CompositeViewer> class NewComp : public osgViewer::CompositeViewer { public: NewComp() : osgViewer::CompositeViewer() {_threadsRunning = false;} }; #endif // _NEWCOMP_H_ Am I missing something or is this a bug? I'm using OSG 2.0, RHEL5. /Jonas _______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/