Robert,

Unfortunately, this causes another problem.  Now when I do this:

$ osgviewerd --run-on-demand --window 0 0 400 400 cow.osg

The window doesn't rerender on resize or repaint.  I would expect that a window resize would set a need to render flag.  Thanks for you help.

Paul Gotzel

Robert Osfield wrote:
Hi Paul,

On Wed, Apr 14, 2010 at 2:31 PM, Robert Osfield
<[email protected]> wrote:
  
So my guess is that the frame loop, when runing on demand, is just
running in a continuous loop checking where a new frame is required.
The solution to high CPU utilization is likely to be just to add a
sleep when on demand rendering is enabled and there is nothing to do.
I'll look into this.
    

I've added a minimum frame time into the run loop when no rendering is
required so that when you enable render of demand it now sleeps to
1/100th of second per time round the frame loop.  With this in place
the CPU usage is now pretty close to 0.

An svn update will get this fix.

Cheers,
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

  
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to