diff --git a/configure.ac b/configure.ac index 401064213..ea2963025 100644 --- a/configure.ac +++ b/configure.ac @@ -686,6 +686,14 @@ case "${host}" in esac AM_CONDITIONAL(HAVE_FRAMEWORK_OSG, test "x$ac_cv_framework_osg" != "x") +AC_MSG_CHECKING([checking for osg::CullSettings::CLEAR_MASK]) +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include ]], + [[osg::CullSettings::VariablesMask mask = osg::CullSettings::CLEAR_MASK;]])], + [AC_DEFINE([HAVE_CULLSETTINGS_CLEAR_MASK],1,[define if OSG has CullSettings::CLEAR_MASK]) + AC_MSG_RESULT([yes])], + [AC_DEFINE([HAVE_CULLSETTINGS_CLEAR_MASK],0,[define if OSG has CullSettings::CLEAR_MASK]) + AC_MSG_RESULT([no])]) AC_LANG_POP dnl Check for system installed zlib diff --git a/src/Main/CameraGroup.cxx b/src/Main/CameraGroup.cxx index 78f83fde7..57371b1d8 100644 --- a/src/Main/CameraGroup.cxx +++ b/src/Main/CameraGroup.cxx @@ -14,6 +14,10 @@ // 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 +#endif + #include "CameraGroup.hxx" #include "globals.hxx" @@ -318,7 +322,10 @@ CameraInfo* CameraGroup::buildCamera(SGPropertyNode* cameraNode) camera->setInheritanceMask(CullSettings::ALL_VARIABLES & ~(CullSettings::CULL_MASK | CullSettings::CULLING_MODE - | CullSettings::CLEAR_MASK)); +#if defined(HAVE_CULLSETTINGS_CLEAR_MASK) + | CullSettings::CLEAR_MASK +#endif + )); osg::Matrix pOff; osg::Matrix vOff; @@ -420,7 +427,10 @@ CameraInfo* CameraGroup::buildGUICamera(SGPropertyNode* cameraNode, camera->setInheritanceMask(CullSettings::ALL_VARIABLES & ~(CullSettings::COMPUTE_NEAR_FAR_MODE | CullSettings::CULLING_MODE - | CullSettings::CLEAR_MASK)); +#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);