Add HAVE_CULLSETTINGS_CLEAR_MASK to configure.ac and check it in camera code
This works around a behavior / interface change in OSG post 2.9.6.
This commit is contained in:
parent
4fc7105675
commit
78ebe9424b
2 changed files with 20 additions and 2 deletions
|
@ -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>]],
|
||||
[[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
|
||||
|
|
|
@ -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 <config.h>
|
||||
#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);
|
||||
|
|
Loading…
Reference in a new issue