Re: [osg-users] Multiples Camera CallBack?
Hi Julian, The primary reason for only having a single callback for each of the Camera initial, pre, post and final DrawCallback is keeping the Camera API clean and minimal. If we were to have a list of callbacks for each of these types of callbacks we'd end up with one very large API, all for very small number of users that would need it. This same issue arises elsewhere in the OSG such as general NodeCallback, but I came up with an appropriate of nesting callbacks to allow one to have multiple callbacks nested within each other so they form a kinda of linked list. The advantage with this approach is that you retain the single set of entry points to set/getting the callback attached to the node, and for the case of scene graph traversal callbacks you enable one to customize the traversal. If we are to add multiple callbacks support into osg::Camera it would probably be least intrusive to do it via nesting as well. In svn/trunk version of the OSG I introduced a new Callback base class that provides nesting, but looking at osg::Camera I see that I didn't roll this out to osg::Camera. Potentially we could do this, I'll have a think about it. The first step would be to subclass osg::Camera::DrawCallback from osg::Callback instead of osg::Object. The next step would be to allow one to get/get the intial, pre, post and final DrawCallback API to use osg::Callback rather than osg::Camera::DrawCallback, although this step has the potential for breaking the API for end users. Prior to any of these changes you can implement your own support for multiple callbacks by creating and MyMultipleDrawCallbacks subclass from osg::Camera::DrawCallback and then let it have a list of DrawCallback that it calls. Robert. On 23 December 2014 at 23:03, Julien Valentin julienvalenti...@gmail.com wrote: Hi, Tell me I'm dumb but I'm kind of surprise that ones can't add several Camera postdraw callbacks. Is there a reason for it? Ex:I'm using osg::OcclusionQueryNodes in my scene, so when I set the PostDrawCallBack of the Camera during CullTraversal it replaces the one setted up by osg::OcclusionQueryNode cull traversal Thank you! Cheers, Julien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62179#62179 ___ 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
Re: [osg-users] Multiples Camera CallBack?
We ran in to this same issue, but used the FinalDrawCallback to get around it. Just means if you have multiple post draws that you want to do, that you have to combine them in to one. Maybe writing an inherited callback for the finaldrawcallback that you can append multiple function calls to? Just an idea, not something I've done. We at one point just rewrote the OcclusionQueryNode's callback in to ours, but that ran in to all sorts of issue when we upgraded from 2.8.2 to 3.0.0. -Original Message- From: osg-users [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Julien Valentin Sent: Tuesday, December 23, 2014 6:04 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Multiples Camera CallBack? Hi, Tell me I'm dumb but I'm kind of surprise that ones can't add several Camera postdraw callbacks. Is there a reason for it? Ex:I'm using osg::OcclusionQueryNodes in my scene, so when I set the PostDrawCallBack of the Camera during CullTraversal it replaces the one setted up by osg::OcclusionQueryNode cull traversal Thank you! Cheers, Julien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62179#62179 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Festive Greetings!
Merry Christmas One and All, I've just wrapped up my work for the year and will now join my family to celebrate Christmas and then New Year. May you all have a great end of year and happy prosperous 2015 ;-) Robert ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Festive Greetings!
Same to you Robert ! And thanks for the support for this year !!! Cheers, Nick On Wed, Dec 24, 2014 at 1:09 PM, Robert Osfield robert.osfi...@gmail.com wrote: Merry Christmas One and All, I've just wrapped up my work for the year and will now join my family to celebrate Christmas and then New Year. May you all have a great end of year and happy prosperous 2015 ;-) Robert ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Single Camera Multiples PostDraw CallBacks?
Thank you for your answers... Hope It save time to other Merry Xmas all -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62188#62188 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Festive Greetings!
Merry Xmas -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62189#62189 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Festive Greetings!
Merry Christmas Robert, enjoy! On Wed Dec 24 2014 at 2:45:52 PM Julien Valentin julienvalenti...@gmail.com wrote: Merry Xmas -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62189#62189 ___ 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