Skip to content

Commit

Permalink
Fix: compile error in OSG >= 3.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
gwaldron committed Oct 2, 2014
1 parent 23d0c4c commit 7b6b8fa
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/osgEarthDrivers/engine_mp/MPGeometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -468,10 +474,15 @@ MPGeometry::compileGLObjects( osg::RenderInfo& renderInfo ) const
compileBufferObject(ncthis->getNormalArray(), contextID);

for(unsigned i=0; i<getVertexAttribArrayList().size(); ++i)
compileBufferObject( getVertexAttribArrayList()[i].array.get(), contextID );
{
osg::Array* a = GET_ARRAY( getVertexAttribArrayList()[i] ).get();
compileBufferObject( a, contextID );
}

for(PrimitiveSetList::const_iterator i = _primitives.begin(); i != _primitives.end(); ++i )
{
compileBufferObject( i->get()->getBufferObject(), contextID );
}

// compile the layer-specific things:
for(unsigned i=0; i<_layers.size(); ++i)
Expand Down

0 comments on commit 7b6b8fa

Please sign in to comment.