Fix picking zone display
This commit is contained in:
parent
e4094356f5
commit
7e6ecfec56
2 changed files with 17 additions and 12 deletions
|
@ -1056,18 +1056,23 @@ void CameraGroup::setCameraCullMasks(Node::NodeMask nm)
|
|||
continue;
|
||||
osg::ref_ptr<osg::Camera> farCamera = info->getCamera(FAR_CAMERA);
|
||||
osg::Camera* camera = info->getCamera( MAIN_CAMERA );
|
||||
if (camera == 0) continue;
|
||||
if (farCamera.valid() && farCamera->getNodeMask() != 0) {
|
||||
camera->setCullMask(nm & ~simgear::BACKGROUND_BIT);
|
||||
camera->setCullMaskLeft(nm & ~simgear::BACKGROUND_BIT);
|
||||
camera->setCullMaskRight(nm & ~simgear::BACKGROUND_BIT);
|
||||
farCamera->setCullMask(nm);
|
||||
farCamera->setCullMaskLeft(nm);
|
||||
farCamera->setCullMaskRight(nm);
|
||||
if (camera) {
|
||||
if (farCamera.valid() && farCamera->getNodeMask() != 0) {
|
||||
camera->setCullMask(nm & ~simgear::BACKGROUND_BIT);
|
||||
camera->setCullMaskLeft(nm & ~simgear::BACKGROUND_BIT);
|
||||
camera->setCullMaskRight(nm & ~simgear::BACKGROUND_BIT);
|
||||
farCamera->setCullMask(nm);
|
||||
farCamera->setCullMaskLeft(nm);
|
||||
farCamera->setCullMaskRight(nm);
|
||||
} else {
|
||||
camera->setCullMask(nm);
|
||||
camera->setCullMaskLeft(nm);
|
||||
camera->setCullMaskRight(nm);
|
||||
}
|
||||
} else {
|
||||
camera->setCullMask(nm);
|
||||
camera->setCullMaskLeft(nm);
|
||||
camera->setCullMaskRight(nm);
|
||||
camera = info->getCamera( GEOMETRY_CAMERA );
|
||||
if (camera == 0) continue;
|
||||
camera->setCullMask( nm & ~simgear::MODELLIGHT_BIT );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1714,7 +1714,7 @@ FGRenderer::update( ) {
|
|||
l->get_sun_angle()*SGD_RADIANS_TO_DEGREES);
|
||||
mUpdateVisitor->setVisibility(actual_visibility);
|
||||
simgear::GroundLightManager::instance()->update(mUpdateVisitor.get());
|
||||
osg::Node::NodeMask cullMask = ~simgear::LIGHTS_BITS & ~simgear::PICK_BIT & ~simgear::MODELLIGHT_BIT;
|
||||
osg::Node::NodeMask cullMask = ~simgear::LIGHTS_BITS & ~simgear::PICK_BIT;
|
||||
cullMask |= simgear::GroundLightManager::instance()
|
||||
->getLightNodeMask(mUpdateVisitor.get());
|
||||
if (_panel_hotspots->getBoolValue())
|
||||
|
|
Loading…
Add table
Reference in a new issue