diff --git a/src/osgPlugins/pfb/ConvertFromPerformer.cpp b/src/osgPlugins/pfb/ConvertFromPerformer.cpp index 9175628bd..64d095f9c 100644 --- a/src/osgPlugins/pfb/ConvertFromPerformer.cpp +++ b/src/osgPlugins/pfb/ConvertFromPerformer.cpp @@ -225,6 +225,7 @@ osg::Node* ConvertFromPerformer::visitSwitch(osg::Group* osgParent,pfSwitch* swi } osgSwitch = new osg::Switch; + osgSwitch->setAllChildrenOff(); if (osgParent) osgParent->addChild(osgSwitch); registerPfObjectForOsgObject(switchNode,osgSwitch); @@ -235,15 +236,15 @@ osg::Node* ConvertFromPerformer::visitSwitch(osg::Group* osgParent,pfSwitch* swi float val = switchNode->getVal(); if (val==PFSWITCH_ON) { - osgSwitch->setValue(osg::Switch::ALL_CHILDREN_ON); + osgSwitch->setAllChildrenOn(); } else if (val==PFSWITCH_OFF) { - osgSwitch->setValue(osg::Switch::ALL_CHILDREN_OFF); + osgSwitch->setAllChildrenOff(); } else { - osgSwitch->setValue((int)val); + osgSwitch->setSingleChildOn((unsigned int)val); } for(int i=0;igetNumChildren();++i) diff --git a/src/osgPlugins/pfb/Makefile b/src/osgPlugins/pfb/Makefile index acba36d89..659f2d905 100644 --- a/src/osgPlugins/pfb/Makefile +++ b/src/osgPlugins/pfb/Makefile @@ -8,6 +8,9 @@ CXXFILES =\ LIBS += $(OSG_LIBS) $(PF_XTRA_LIBS) $(OTHER_LIBS) +# Performer libs must be compiled -O on Linux +DBGF += -O + TARGET_BASENAME = pfb include $(TOPDIR)/Make/cygwin_plugin_def PLUGIN = $(PLUGIN_PREFIX)$(TARGET_BASENAME).$(PLUGIN_EXT)