HI Himar, I don't recall the details, but CompositeViewer and Viewer should behave the same w.r.t lazy frame rendering, so perhaps something is missing from the CompositeViewer side. I'm not at a dev computer right now so can't check the code.
As for adding public hooks to requestRedraw flag, this should already be accessible. The GUIActionHandler is what handles this, again I don't have the source code in front of me, but have a dig through include/osgViewer to see which classes subclass from it, I think it's osgViewer::View or ViewerBase. Robert. On Wed, Oct 21, 2009 at 6:29 PM, Himar Carmona <himarcarm...@gmail.com> wrote: > Hello, > > recently (developer version 2.9.5) i noticed that the implementation of > checkNeedToDoFrame in both Viewer and CompositeViewer have different > conditions. Viewer checks if the camera has an UpdateCallback or if any node > has an UpdateCallback, while CompositeViewer doesn't. Is there a rationale > behind that? > > I'm asking about it because we use rendering on demand and all went ok > until we needed to render based upon the manipulator behavior, i.e. upon the > flag _requestRedraw. We didn't use checkNeedToDoFrame, instead we check for > events and databasepager request (like checkNeedToDoFrame). But now we need > to check _requestRedraw, but it is protected and there isn't any getter to > get its value, so we change the code to call checkNeedToDoFrame. But this > method return true if there is any UpdateCallback. Unluckily, we have many > UpdateCallbacks and the end result is a continuous render (not what we want, > and this problem is aggravated due to the high cpu consumption of the > render, perhaps related to NVIDIA's active waiting). > > I'm searching for a way to implement a method similar to > checkNeedToDoFrame out of the Viewer, > > - is there an alternate way to test if requestRedraw is set? How > about adding a getRequestRedraw method to ViewerBase ? Will it have any > implications or side effects? > - do we need to check for UpdateCallbacks? In our case, we use > Updatecallbacks to check an external condition, they do nothing 90% of the > time. > - does the implementation of checkNeedToDoFrame need to be > different between Viewer and CompositeViewer or is this a bug? > > Thanks in advance and best regards, > Himar. > > > _______________________________________________ > 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