commit 57adc9df906ba9c06196e29b14a68a84f8159a01 Author: Tony Vasile Date: Tue Dec 15 00:02:54 2015 +1100 Modified to compile against OpenSceneGraph 3.5.0 diff --git a/include/osgOcean/MipmapGeometryVBO b/include/osgOcean/MipmapGeometryVBO index beb4615..3cbfb0c 100644 --- a/include/osgOcean/MipmapGeometryVBO +++ b/include/osgOcean/MipmapGeometryVBO @@ -144,7 +144,7 @@ namespace osgOcean * Rather than use standard computeBound() this computes the bounding box * using the offset and the worldSize. */ - osg::BoundingBox computeBound( void ) const; + osg::BoundingSphere computeBound( void ) const; /** * Set the tile offset for shader positioning. @@ -164,7 +164,7 @@ namespace osgOcean } dirtyBound(); - setBound( computeBound() ); + setBound( getBoundingBox() ); } /** diff --git a/src/osgOcean/MipmapGeometryVBO.cpp b/src/osgOcean/MipmapGeometryVBO.cpp index 6faa71f..69b354d 100644 --- a/src/osgOcean/MipmapGeometryVBO.cpp +++ b/src/osgOcean/MipmapGeometryVBO.cpp @@ -83,8 +83,9 @@ namespace osgOcean { } - osg::BoundingBox MipmapGeometryVBO::computeBound( void ) const + osg::BoundingSphere MipmapGeometryVBO::computeBound( void ) const { +/* osg::BoundingBox bb; bb.xMin() = _offset.x(); @@ -95,6 +96,8 @@ namespace osgOcean bb.zMax() = 5.f; return bb; +*/ + return osg::BoundingSphere(getBoundingBox()); } bool MipmapGeometryVBO::updatePrimitives( unsigned int level, unsigned int levelRight, unsigned int levelBelow ) diff --git a/src/osgOcean/OceanScene.cpp b/src/osgOcean/OceanScene.cpp index d6ddc42..a6612b7 100644 --- a/src/osgOcean/OceanScene.cpp +++ b/src/osgOcean/OceanScene.cpp @@ -881,7 +881,7 @@ void OceanScene::traverse( osg::NodeVisitor& nv ) bool surfaceVisible = _oceanSurface->isVisible(*cv, eyeAboveWater); - (*_oceanSurface->getCullCallback())(_oceanSurface.get(), &nv); + (*_oceanSurface->getCullCallback()).run(_oceanSurface.get(), &nv); preRenderCull(*cv, eyeAboveWater, surfaceVisible); // reflections/refractions diff --git a/src/osgOcean/SiltEffect.cpp b/src/osgOcean/SiltEffect.cpp index 7ab41cd..2623d89 100644 --- a/src/osgOcean/SiltEffect.cpp +++ b/src/osgOcean/SiltEffect.cpp @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -648,8 +649,6 @@ void SiltEffect::SiltDrawable::drawImplementation(osg::RenderInfo& renderInfo) c { if (!_geometry) return; - const osg::Geometry::Extensions* extensions = osg::Geometry::getExtensions(renderInfo.getContextID(),true); - glPushMatrix(); typedef std::vector DepthMatrixStartTimeVector; @@ -669,7 +668,7 @@ void SiltEffect::SiltDrawable::drawImplementation(osg::RenderInfo& renderInfo) c itr != orderedEntries.rend(); ++itr) { - extensions->glMultiTexCoord1f(GL_TEXTURE0+1, (*itr)->second.startTime); + glMultiTexCoord1f(GL_TEXTURE0+1, (*itr)->second.startTime); glMatrixMode( GL_MODELVIEW ); glLoadMatrix((*itr)->second.modelview.ptr());