[osg-users] Camera::setPreDrawCallback -> add?
Robert Osfield
robert.osfield at gmail.com
Fri Aug 31 06:43:49 PDT 2007
Hi Anders,
There is only one callback for pre and post draw callbacks to keep the
API as simple as possible - just two methods per callback - a get and
set. Once you add a list you end with add/remove/get/getnumber.
One way to do multiple callbacks is to nest the callbacks, so you have
your own CompositeCameraCallback which contains a list of Camera
callbacks.
Robert.
On 8/31/07, Anders Backman <andersb at cs.umu.se> wrote:
> Hi.
>
> In osgProducer there was the concept of a list of pre/post drawcallbacks.
>
> In osgViewer there can be only one.
>
> Is purposely done for a specific reason (performance, complexity, ..)?
> It is not very uncommon to have several pre/post draw callbacks for a
> viewer, and if you are developing an API where you internally to the API add
> drawcallbacks, and the user of the api accesses the camera later on and do
> camera->setPreDrawCallback(myCallback), well then you are
> fried.
>
>
> So could it be possible to refactor that into a list of callbacks?
> /Anders
> --
>
>
> ________________________________________________________________
> Anders Backman Email: andersb at cs.umu.se
> HPC2N/VRlab Phone: +46 (0)90-786 9936
> Umea university Cellular: +46 (0)70-392 64 67
> S-901 87 UMEA SWEDEN Fax: +46 90-786 6126
> http://www.cs.umu.se/~andersb
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
More information about the osg-users
mailing list