From: Thomas Geymayer Date: Sun, 10 Aug 2014 13:36:27 +0000 (+0200) Subject: Canvas: fix element mouse hit detection with OSG 3.3.2. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=68d0891665683cbe115c0689a9f17f4aa078cf56;p=simgear.git Canvas: fix element mouse hit detection with OSG 3.3.2. --- diff --git a/simgear/canvas/elements/CanvasElement.cxx b/simgear/canvas/elements/CanvasElement.cxx index f8952925..6d8c9305 100644 --- a/simgear/canvas/elements/CanvasElement.cxx +++ b/simgear/canvas/elements/CanvasElement.cxx @@ -398,7 +398,13 @@ namespace canvas // Drawables have a bounding box... if( _drawable ) - return _drawable->getBound().contains(osg::Vec3f(local_pos, 0)); + return _drawable-> +#if OSG_VERSION_LESS_THAN(3,3,2) + getBound() +#else + getBoundingBox() +#endif + .contains(osg::Vec3f(local_pos, 0)); else if( _transform.valid() ) // ... for other elements, i.e. groups only a bounding sphere is available return _transform->getBound().contains(osg::Vec3f(parent_pos, 0));