Re: [osg-users] Cannot stop rendering slave camera

2016-06-15 Thread Christian Buchner
What also works for me is to take my render to texture slave cameras out of the scene graph group they are contained in. For thread safety, this has to happen in an update callback. I use this method for computation in GLSL, so the computation is only triggered when it's necessary and not in every

Re: [osg-users] Cannot stop rendering slave camera

2016-06-15 Thread Etienne de Sarrieu
Hi, Thank you very much Robert, this solves my problem !!! Cheers, Etienne -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=67635#67635 ___ osg-users mailing list osg-users@lists.openscenegraph.org ht

Re: [osg-users] Cannot stop rendering slave camera

2016-06-15 Thread Robert Osfield
Hi Etienne, To toggle on/off a Camera the most efficient way to do it is to toggle it's NodeMask i.e // switch off slave_camera->setNodeMask(0x0); // switch on slave_camera->setNodeMask(0x); Robert. On 15 June 2016 at 10:07, Etienne de Sarrieu wrote: > Hi, > > Due to performance

[osg-users] Cannot stop rendering slave camera

2016-06-15 Thread Etienne de Sarrieu
Hi, Due to performance consumption, I am trying to disable rendering of a slave camera, but it seems impossible. The camera is _pov_camera, and is defined as below : Code: void MySensor::initialize() { Sensor::initialize(); // Master camera depth texture _input_depth = new osg::Te