X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2Fmodel_panel.cxx;h=ac2ab88b1c3bbd9194f2db62a32e079586bf4b22;hb=fce2a53fc7cf5fb8e392a5e0570ad81f24e3ab0c;hp=eef538cb0a41c7b809e7e3a2078afdf3066c3090;hpb=94caa0b89182875ee6ee86ea887f07b8717b8dba;p=flightgear.git diff --git a/src/Model/model_panel.cxx b/src/Model/model_panel.cxx index eef538cb0..ac2ab88b1 100644 --- a/src/Model/model_panel.cxx +++ b/src/Model/model_panel.cxx @@ -14,7 +14,6 @@ #include #include #include -#include #include "panelnode.hxx" #include "model_panel.hxx" @@ -22,24 +21,16 @@ using std::vector; using namespace simgear; - -static -osg::Node* load_panel(SGPropertyNode *n) -{ - osg::Geode* geode = new osg::Geode; - geode->addDrawable(new FGPanelNode(n)); - return geode; -} - //////////////////////////////////////////////////////////////////////// // Global functions. //////////////////////////////////////////////////////////////////////// osg::Node * -fgLoad3DModelPanel(const string &path, SGPropertyNode *prop_root) +fgLoad3DModelPanel(const std::string &path, SGPropertyNode *prop_root) { - osg::Node* node = SGModelLib::loadModel(path, prop_root, load_panel); + bool loadPanels = true; + osg::Node* node = SGModelLib::loadModel(path, prop_root, NULL, loadPanels); if (node) node->setNodeMask(~SG_NODEMASK_TERRAIN_BIT); return node;