1
0
Fork 0

Compositor: Removed the option to change the CameraGroup cull masks. Instead, the FGRenderer sets the view master camera cull mask, which may be inherited by any pass that needs it.

This commit is contained in:
Fernando García Liñán 2019-02-23 23:29:12 +01:00
parent 8e35b7efc7
commit ed276141c7
3 changed files with 4 additions and 11 deletions

View file

@ -802,12 +802,6 @@ CameraGroup* CameraGroup::buildCameraGroup(osgViewer::Viewer* viewer,
return cgroup;
}
void CameraGroup::setCameraCullMasks(Node::NodeMask nm)
{
for (const auto &info : _cameras)
info->compositor->setCameraCullMasks(nm);
}
void CameraGroup::resized()
{
for (const auto &info : _cameras)

View file

@ -111,7 +111,7 @@ struct CameraInfo : public osg::Referenced
* so they can avoid recalculating them.
*/
osg::Matrix viewMatrix, projMatrix;
/** The Compositor used to manage the pipeline of this camera
/** The Compositor used to manage the pipeline of this camera.
*/
osg::ref_ptr<simgear::compositor::Compositor> compositor;
};
@ -170,9 +170,6 @@ public:
* current viewport.
*/
void setCameraParameters(float vfov, float aspectRatio);
/** Set the cull mask on all non-GUI cameras
*/
void setCameraCullMasks(osg::Node::NodeMask nm);
/** Update camera properties after a resize event.
*/
void resized();

View file

@ -730,7 +730,9 @@ FGRenderer::update( ) {
->getLightNodeMask(_updateVisitor.get());
if (_panel_hotspots->getBoolValue())
cullMask |= simgear::PICK_BIT;
CameraGroup::getDefault()->setCameraCullMasks(cullMask);
camera->setCullMask(cullMask);
camera->setCullMaskLeft(cullMask);
camera->setCullMaskRight(cullMask);
}
void