[osg-users] AddSlave & removeSlave camera seem inconsistent

Robert Osfield robert.osfield at gmail.com
Thu Apr 11 08:47:27 PDT 2019


Hi Bruce,


On Thu, 11 Apr 2019 at 00:37, Bruce Clay <bclay1297 at gmail.com> wrote:
> Is there a way to programmatically determine the index when a slave camera is added to insure the correct one is removed?

I just looked t include/osg/View header and found :

        unsigned int findSlaveIndexForCamera(osg::Camera* camera) const;

Another approach you could take would be to add all the slave Camera
you want and then enable/disable then by setting the respective Camera
NodeMask to 0x0 and 0xffffffff to toggle it off/on respectively.  This
way you could avoid needing to add/remove them.

Robert.


More information about the osg-users mailing list