From: Frederic Bouvier Date: Sun, 15 Jul 2012 08:03:19 +0000 (+0200) Subject: OSG 3.0.1 has no osg::Node::asCamera method X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=735b6d43ec3c0d5a2c59cdc17ecf8436b6f77e9b;p=flightgear.git OSG 3.0.1 has no osg::Node::asCamera method --- diff --git a/src/Viewer/CameraGroup.cxx b/src/Viewer/CameraGroup.cxx index 4cabb3181..3d84717e5 100644 --- a/src/Viewer/CameraGroup.cxx +++ b/src/Viewer/CameraGroup.cxx @@ -1092,7 +1092,7 @@ void CameraGroup::setCameraCullMasks(Node::NodeMask nm) if (camera == 0) continue; osg::Switch* sw = camera->getChild(0)->asSwitch(); for (unsigned int i = 0; i < sw->getNumChildren(); ++i) { - osg::Camera* lc = sw->getChild(i)->asCamera(); + osg::Camera* lc = dynamic_cast(sw->getChild(i)); if (lc == 0) continue; string name = lc->getName(); if (name == "LightCamera") {