[osg-users] osg::Operation lags

Roman Grigoriev grigoriev at gosniias.ru
Fri Mar 20 00:45:21 PDT 2009


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;

      

};

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20090320/7f099122/attachment-0002.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mail.jpg
Type: image/jpeg
Size: 56399 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20090320/7f099122/attachment-0002.jpg>


More information about the osg-users mailing list