[osg-users] 2 GraphicContexts, 2 viewports, 2 cameras and 1 scene question

2009-04-24 Thread Cristina
Hi,

I created 2 cameras each one with their own viewport and GraphicContext. I have 
one scene. Inside the scene I have a group node that contains 2 children. Each 
child has a different node mask.
I was trying to make one camera showing one child and the other camera showing 
the other child inside the scene graph by modifying the CullMask of the 
camera(for the first camera I set the cullMask the same as the node mask of the 
first child and for the second camera I set the mask the same as the node mask 
of the second child).

Unfortunatelly, something is wrong because both cameras show me the first 
child. 

Could you please help me ? What am I doing wrong?

Thank you.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=10819#10819





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 2 GraphicContexts, 2 viewports, 2 cameras and 1 scene question

2009-04-24 Thread Robert Osfield
Hi Cristina,

Have a look at the osgstereoimage example as this does something quite similar.

Robert.

On Fri, Apr 24, 2009 at 6:18 PM, Cristina cristina.pap...@meggitt.com wrote:
 Hi,

 I created 2 cameras each one with their own viewport and GraphicContext. I 
 have one scene. Inside the scene I have a group node that contains 2 
 children. Each child has a different node mask.
 I was trying to make one camera showing one child and the other camera 
 showing the other child inside the scene graph by modifying the CullMask of 
 the camera(for the first camera I set the cullMask the same as the node mask 
 of the first child and for the second camera I set the mask the same as the 
 node mask of the second child).

 Unfortunatelly, something is wrong because both cameras show me the first 
 child.

 Could you please help me ? What am I doing wrong?

 Thank you.

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=10819#10819





 ___
 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] 2 GraphicContexts, 2 viewports, 2 cameras and 1 scene question

2009-04-24 Thread Cristina
Hi Robert,

The osgstereoimage example does not create 2 cameras.
Also I'm not sure what 
osg::DisplaySettings::instance()-setStereo(true);
does, but I don't think this example helps me.
I could have n number of viewports each one with their own camera, and when I 
traverse the scene graph, based on a certain mask I would like to show 
different thingsTo be more precise, some cameras will show objects with day 
texture and some will show objects with thermo texture.

Regards,
Cristina

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=10828#10828





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 2 GraphicContexts, 2 viewports, 2 cameras and 1 scene question

2009-04-24 Thread Cristina
Thanks Robert.
I was able to figure it out.
My culling mask was wrong.

Regards,
Cristina

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=10830#10830





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org