[osg-users] osg::Operation lags

Roman Grigoriev grigoriev at gosniias.ru
Fri Mar 20 02:53:46 PDT 2009

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




From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Robert
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.  


2009/3/20 Roman Grigoriev <grigoriev at 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();




class UpdateSensorHMDOperation : public osg::Operation





        Operation("UpdateTextOperation", true),



             osg::notify(osg::NOTICE)<<"load update operation"<<std::endl;



    virtual void operator () (osg::Object* callingObject)




       virtual void release()





      bool                               _load;

      bool                               _valid1;



osg-users mailing list
osg-users at lists.openscenegraph.org


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20090320/bc69ca42/attachment-0003.htm>

More information about the osg-users mailing list