// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include "CameraGroup.hxx"
#include "globals.hxx"
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;
WindowBuilder *wBuild = WindowBuilder::getWindowBuilder();
const SGPropertyNode* windowNode = cameraNode->getNode("window");
GraphicsWindow* window = 0;
- static int cameraNum = 0;
int cameraFlags = DO_INTERSECTION_TEST;
if (windowNode) {
// New style window declaration / definition
| CullSettings::VIEW_FRUSTUM_CULLING);
camera->setInheritanceMask(CullSettings::ALL_VARIABLES
& ~(CullSettings::CULL_MASK
- | CullSettings::CULLING_MODE));
+ | CullSettings::CULLING_MODE
+#if defined(HAVE_CULLSETTINGS_CLEAR_MASK)
+ | CullSettings::CLEAR_MASK
+#endif
+ ));
osg::Matrix pOff;
osg::Matrix vOff;
const SGPropertyNode* windowNode = (cameraNode
? cameraNode->getNode("window")
: 0);
- static int cameraNum = 0;
if (!window) {
if (windowNode) {
// New style window declaration / definition
camera->setClearMask(0);
camera->setInheritanceMask(CullSettings::ALL_VARIABLES
& ~(CullSettings::COMPUTE_NEAR_FAR_MODE
- | CullSettings::CULLING_MODE));
+ | CullSettings::CULLING_MODE
+#if defined(HAVE_CULLSETTINGS_CLEAR_MASK)
+ | CullSettings::CLEAR_MASK
+#endif
+ ));
camera->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);
camera->setCullingMode(osg::CullSettings::NO_CULLING);
camera->setProjectionResizePolicy(Camera::FIXED);