1 diff --git a/src/Canvas/canvas_mgr.cxx b/src/Canvas/canvas_mgr.cxx
2 index 6646b77..820934e 100644
3 --- a/src/Canvas/canvas_mgr.cxx
4 +++ b/src/Canvas/canvas_mgr.cxx
7 #include "canvas_mgr.hxx"
9 +#include <osg/Version>
11 #include <Cockpit/od_gauge.hxx>
12 #include <Main/fg_props.hxx>
13 #include <Scripting/NasalModelData.hxx>
14 @@ -49,7 +51,11 @@ static sc::Placements addSceneObjectPlacement( SGPropertyNode* placement,
15 model_data->getNode(),
18 +#if OSG_VERSION_LESS_THAN(3,3,2)
19 canvas->getCullCallback(),
21 + dynamic_cast<osg::NodeCallback*>(canvas->getCullCallback()),
26 diff --git a/src/FDM/groundcache.cxx b/src/FDM/groundcache.cxx
27 index 0b34115..379d70a 100644
28 --- a/src/FDM/groundcache.cxx
29 +++ b/src/FDM/groundcache.cxx
31 #include <osg/MatrixTransform>
32 #include <osg/PositionAttitudeTransform>
33 #include <osg/CameraView>
34 +#include <osg/Version>
36 #include <simgear/sg_inlines.h>
37 #include <simgear/constants.h>
38 @@ -92,7 +93,11 @@ public:
40 virtual void apply(osg::Node& node)
42 +#if OSG_VERSION_LESS_THAN(3,3,2)
43 if (!testBoundingSphere(node.getBound()))
45 + if (!testBoundingSphere(node.getBoundingSphere()))
49 addBoundingVolume(node);
50 @@ -100,7 +105,11 @@ public:
52 virtual void apply(osg::Group& group)
54 +#if OSG_VERSION_LESS_THAN(3,3,2)
55 if (!testBoundingSphere(group.getBound()))
57 + if (!testBoundingSphere(group.getBoundingSphere()))
61 simgear::BVHSubTreeCollector::NodeList parentNodeList;
62 @@ -133,7 +142,11 @@ public:
63 if (transform.getReferenceFrame() != osg::Transform::RELATIVE_RF)
66 +#if OSG_VERSION_LESS_THAN(3,3,2)
67 if (!testBoundingSphere(transform.getBound()))
69 + if (!testBoundingSphere(transform.getBoundingSphere()))
73 osg::Matrix inverseMatrix;
74 diff --git a/src/Scenery/scenery.cxx b/src/Scenery/scenery.cxx
75 index 73d0b7f..d5fa933 100644
76 --- a/src/Scenery/scenery.cxx
77 +++ b/src/Scenery/scenery.cxx
79 #include <osg/PositionAttitudeTransform>
80 #include <osg/CameraView>
82 +#include <osg/Version>
84 #include <osgViewer/Viewer>
86 @@ -112,7 +113,11 @@ public:
88 if (&node == _skipNode)
90 +#if OSG_VERSION_LESS_THAN(3,3,2)
91 if (!testBoundingSphere(node.getBound()))
93 + if (!testBoundingSphere(node.getBoundingSphere()))
97 addBoundingVolume(node);
98 @@ -122,7 +127,11 @@ public:
100 if (&group == _skipNode)
102 +#if OSG_VERSION_LESS_THAN(3,3,2)
103 if (!testBoundingSphere(group.getBound()))
105 + if (!testBoundingSphere(group.getBoundingSphere()))
110 @@ -153,7 +162,11 @@ private:
111 if (transform.getReferenceFrame() != osg::Transform::RELATIVE_RF)
114 +#if OSG_VERSION_LESS_THAN(3,3,2)
115 if (!testBoundingSphere(transform.getBound()))
117 + if (!testBoundingSphere(transform.getBoundingSphere()))
121 osg::Matrix inverseMatrix;
122 diff --git a/src/Scenery/tileentry.cxx b/src/Scenery/tileentry.cxx
123 index 31d14c7..d49c1b1 100644
124 --- a/src/Scenery/tileentry.cxx
125 +++ b/src/Scenery/tileentry.cxx
130 +#include <osg/Version>
132 #include <simgear/bucket/newbucket.hxx>
133 #include <simgear/debug/logstream.hxx>
134 @@ -81,7 +82,11 @@ void TileEntry::prep_ssg_node(float vis) {
136 // visibility can change from frame to frame so we update the
137 // range selector cutoff's each time.
138 +#if OSG_VERSION_LESS_THAN(3,3,2)
139 float bounding_radius = _node->getChild(0)->getBound().radius();
141 + float bounding_radius = _node->getChild(0)->getBoundingSphere().radius();
143 _node->setRange( 0, 0, vis + bounding_radius );