[osg-users] osg::Operation lags
robert.osfield at gmail.com
Fri Mar 20 03:43:41 PDT 2009
2009/3/20 Roman Grigoriev <grigoriev at gosniias.ru>
> 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
I have never seen problems like yours when using OperationThread/Operatons,
but on a second review I see that your OpenThread never sleeps, it just
churns away as effectively a spin lock on the CPU. If your machine doesn't
have sufficient cores to handle a thead using 100% of the CPU core then
you'll get frame stalls like you have.
Try sticking a OpenThreads::Thread::YieldCurrentThread() into your
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the osg-users