From 7b6b8fac1d8ed406cd8e918439c4cefdcee678e1 Mon Sep 17 00:00:00 2001 From: gwaldron Date: Thu, 2 Oct 2014 08:06:05 -0400 Subject: [PATCH] Fix: compile error in OSG >= 3.1.8 --- src/osgEarthDrivers/engine_mp/MPGeometry.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/osgEarthDrivers/engine_mp/MPGeometry.cpp b/src/osgEarthDrivers/engine_mp/MPGeometry.cpp index 5f25b762fb..763dffffa1 100644 --- a/src/osgEarthDrivers/engine_mp/MPGeometry.cpp +++ b/src/osgEarthDrivers/engine_mp/MPGeometry.cpp @@ -328,12 +328,18 @@ MPGeometry::renderPrimitiveSets(osg::State& state, } } -#if OSG_VERSION_GREATER_THAN(3,3,1) +#if OSG_VERSION_GREATER_OR_EQUAL(3,3,2) # define COMPUTE_BOUND computeBoundingBox #else # define COMPUTE_BOUND computeBound #endif +#if OSG_VERSION_GREATER_OR_EQUAL(3,1,8) +# define GET_ARRAY(a) (a) +#else +# define GET_ARRAY(a) (a).array +#endif + osg::BoundingBox MPGeometry:: COMPUTE_BOUND() const { @@ -468,10 +474,15 @@ MPGeometry::compileGLObjects( osg::RenderInfo& renderInfo ) const compileBufferObject(ncthis->getNormalArray(), contextID); for(unsigned i=0; iget()->getBufferObject(), contextID ); + } // compile the layer-specific things: for(unsigned i=0; i<_layers.size(); ++i)