Thanks Miguel, that works just fine for me. Murray

Miguel Martinez wrote:
> try
> 
> view->getCamera()->setNodeMask(0x0)  // DISABLE
> view->getCamera()->setNodeMask(0xffffffff) //ENABLE
> 
> 
> Murray Curtis escribió:
>> How do I switch a view on/off on CompositeViewer?
>>
>> I'm creating two views with a shared graphics context. I add only one 
>> view to a composite viewer but both views are rendered even though 
>> viewer::getNumViews() reports only 1 view.
>>
>> I was hoping to use CompositeViewer::addView() and removeView() to 
>> control my rear view mirror.
>>
>>    gc = osg::GraphicsContext::createGraphicsContext(...
>>
>>    _mainView = new osgViewer::View;
>>    _mainView->getCamera()->setViewport(...
>>    _mainView->getCamera()->setGraphicsContext(gc.get());
>>
>>    _rearView = new osgViewer::View;
>>    _rearView->getCamera()->setViewport(...
>>    _rearView->getCamera()->setGraphicsContext(gc.get());
>>
>>    _viewer = new osgViewer::CompositeViewer();
>>    _viewer->addView(_mainView);
>>
>> At this point viewer::getNumViews() == 1 but both views are visible.
>>
>> Many thanks
>> Murray Curtis
>> www.tagsystems.com.au
>>
>>
>> _______________________________________________
>> osg-users mailing list
>> [email protected]
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>   
> 
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 
> 
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to