@@ -328,12 +328,18 @@ MPGeometry::renderPrimitiveSets(osg::State& state,
328328 }
329329}
330330
331- #if OSG_VERSION_GREATER_THAN (3,3,1 )
331+ #if OSG_VERSION_GREATER_OR_EQUAL (3,3,2 )
332332# define COMPUTE_BOUND computeBoundingBox
333333#else
334334# define COMPUTE_BOUND computeBound
335335#endif
336336
337+ #if OSG_VERSION_GREATER_OR_EQUAL(3,1,8)
338+ # define GET_ARRAY (a ) (a)
339+ #else
340+ # define GET_ARRAY (a ) (a).array
341+ #endif
342+
337343osg::BoundingBox
338344MPGeometry:: COMPUTE_BOUND() const
339345{
@@ -468,10 +474,15 @@ MPGeometry::compileGLObjects( osg::RenderInfo& renderInfo ) const
468474 compileBufferObject (ncthis->getNormalArray (), contextID);
469475
470476 for (unsigned i=0 ; i<getVertexAttribArrayList ().size (); ++i)
471- compileBufferObject ( getVertexAttribArrayList ()[i].array .get (), contextID );
477+ {
478+ osg::Array* a = GET_ARRAY ( getVertexAttribArrayList ()[i] ).get ();
479+ compileBufferObject ( a, contextID );
480+ }
472481
473482 for (PrimitiveSetList::const_iterator i = _primitives.begin (); i != _primitives.end (); ++i )
483+ {
474484 compileBufferObject ( i->get ()->getBufferObject (), contextID );
485+ }
475486
476487 // compile the layer-specific things:
477488 for (unsigned i=0 ; i<_layers.size (); ++i)
0 commit comments