diff --git a/src/Main/CameraGroup.cxx b/src/Main/CameraGroup.cxx index 57371b1d8..954a591e5 100644 --- a/src/Main/CameraGroup.cxx +++ b/src/Main/CameraGroup.cxx @@ -202,7 +202,7 @@ void CameraGroup::update(const osg::Vec3d& position, camera->setProjectionMatrix(projectionMatrix); camera->setCullMask(camera->getCullMask() | simgear::BACKGROUND_BIT); - camera->setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + camera->setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); farCamera->setNodeMask(0); } else { Matrix nearProj, farProj;