> On Fri, Feb 29, 2008 at 6:24 PM, Paul Martz > <[EMAIL PROTECTED]> wrote: > > > The RenderInfo version is the main one now, this calls the > > > Camera version for backwards compatibility. > > > > This change effectively deprecates the old interface, because if > > someone overrides the new operator()(RenderInfo&) interface but > > doesn't call the old interface in their callback, then the old > > interface never gets called. Is this correct? > > Yes this is correct, but if one doesn't call the old method > in your own callback it really isn't a problem as the old > method is just a non op anyway, it only isn't a non op if you > implement it, and only ever a problem if you implement both.
Maybe I'm not making myself clear. What you say is true if and only if the only code that uses the old callback is your application. If core OSG is using the old interface callback, and an application overrides the new callback and doesn't call the old callback, then the piece of core OSG using the old callback will break. This is the case with OcclusionQueryNode. It is currently coded to use the old callback. If an app overrides the new callback and doesn't call the old callback, and has OcclusionQueryNode in its scene graph, the OQN won't be able to retrieve results, and will stop functioning. > > Currently, OcclusionQueryNode uses the old interface to retrieve > > query results. > > > > Could you possibly rearchitect this change so that we have some > > assurance that the old interface will continue to get called? > > Alternately, you could modify OcclusionQueryNode to use > the new callback interface. > > I don't see a strong need to remove the old method right now, > its slightly less minimal and perhaps a potentially little > confusing but code wise its not unsafe. I'm not asking for the old method to be removed. I'd just like to see this change modified to ensure that the old callback always gets executed, so that OcclusionQueryNode doesn't break if an app overrides the new callback but fails to call the old callback. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com 303 859 9466 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

