Changed the Viewer::realize() calls across to not using the threading paramter
leaving it up to the Viewer to specify the mode (which by default is MultiThreaded). Added a check for the presence of osgParticle systems so that threading is disabled in this case.
This commit is contained in:
@@ -46,6 +46,7 @@ namespace osgParticle
|
||||
ParticleProcessor();
|
||||
ParticleProcessor(const ParticleProcessor ©, const osg::CopyOp ©op = osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
virtual const char *libraryName() const { return "osgParticle"; }
|
||||
virtual const char *className() const { return "ParticleProcessor"; }
|
||||
virtual bool isSameKindAs(const osg::Object *obj) const { return dynamic_cast<const ParticleProcessor*>(obj) != 0; }
|
||||
virtual void accept(osg::NodeVisitor& nv) { if (nv.validNodeMask(*this)) { nv.pushOntoNodePath(this); nv.apply(*this); nv.popFromNodePath(); } }
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace osgParticle
|
||||
inline VariableRateCounter();
|
||||
inline VariableRateCounter(const VariableRateCounter ©, const osg::CopyOp ©op = osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
virtual const char *libraryName() const { return "osgParticle"; }
|
||||
virtual const char *className() const { return "VariableRateCounter"; }
|
||||
virtual bool isSameKindAs(const osg::Object *obj) const { return dynamic_cast<const VariableRateCounter *>(obj) != 0; }
|
||||
|
||||
|
||||
@@ -137,9 +137,11 @@ class OSGPRODUCER_EXPORT OsgCameraGroup : public Producer::CameraGroup
|
||||
|
||||
void advance();
|
||||
|
||||
/** Set the threading model and then call realize().*/
|
||||
virtual bool realize(ThreadingModel thread_model );
|
||||
|
||||
/** Realize the render surfaces (OpenGL graphics) and various threads, and call any realize callbacks.*/
|
||||
virtual void realize( ThreadingModel thread_model= SingleThreaded );
|
||||
virtual bool realize();
|
||||
|
||||
/** Set the model view matrix of the camera group,
|
||||
* by individually set all the camera groups's camera.*/
|
||||
|
||||
@@ -72,7 +72,10 @@ class OSGPRODUCER_EXPORT Viewer : public OsgCameraGroup, public osgGA::GUIAction
|
||||
|
||||
bool done() const { return _done; }
|
||||
|
||||
virtual void realize( ThreadingModel thread_model= SingleThreaded );
|
||||
/** Set the threading model and then call realize().*/
|
||||
virtual bool realize(ThreadingModel thread_model);
|
||||
|
||||
virtual bool realize();
|
||||
|
||||
virtual void sync();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user