Hi Robert! As you've seen in my operation thread I simply write to stdout simple message: "update" and nothing more.
But framerate lags unpredictable. Maybe there is good example or readme how to use operationthread Thanx in advance Bye From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Friday, March 20, 2009 12:27 PM To: OpenSceneGraph Users Subject: Re: [osg-users] osg::Operation lags HI Roman, Is i the UpdateSensoeHMDOperation that is at fault? Put your own timing stats into your code and see how long this is tacking to run, my guess is that it's cost will be rather sporadic - if this is the case then you need to change the way you manage this code, such as by creating an OperationThread that sits in the background and polls the device(s), and the during the update thread it merges changes required. Robert. 2009/3/20 Roman Grigoriev <grigor...@gosniias.ru> Hi Guys! I'd like to use osg::Operation to read sensor data to viewer orientation So I test simple operation but have strange results - lags in frame rate. I attach picture to demonstrate it My config osg 2.7.2 vista nvidia 8600m gt operationThread = new osg::OperationThread; osg::ref_ptr<UpdateSensorHMDOperation> updateOperation; updateOperation = new UpdateSensorHMDOperation(); operationThread->add(updateOperation.get()); operationThread->startThread(); viewer->addUpdateOperation(updateOperation.get()); class UpdateSensorHMDOperation : public osg::Operation { public: UpdateSensorHMDOperation(): Operation("UpdateTextOperation", true), _load(false),_valid1(false) { osg::notify(osg::NOTICE)<<"load update operation"<<std::endl; } virtual void operator () (osg::Object* callingObject) { osg::notify(osg::NOTICE)<<"update"<<std::endl; } virtual void release() { } bool _load; bool _valid1; }; _______________________________________________ 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