Changeset 186 for osgVisual/trunk/src/extLink
- Timestamp:
- Jan 8, 2011, 8:13:43 PM (14 years ago)
- Location:
- osgVisual/trunk/src/extLink
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
osgVisual/trunk/src/extLink/dataIO_extLinkDummy.cpp
r132 r186 32 32 } 33 33 34 void dataIO_extLinkDummy::init()34 bool dataIO_extLinkDummy::init(xmlNode* configurationNode) 35 35 { 36 36 OSG_NOTIFY( osg::ALWAYS ) << "extLinkDummy init()" << std::endl; 37 return true; 38 } 39 40 bool dataIO_extLinkDummy::processXMLConfiguration(xmlNode* extLinkConfig_) 41 { 42 OSG_NOTIFY( osg::ALWAYS ) << "extLinkDummy processXMLConfiguration()" << std::endl; 43 return true; 37 44 } 38 45 -
osgVisual/trunk/src/extLink/dataIO_extLinkVCL.cpp
r121 r186 31 31 } 32 32 33 void dataIO_extLinkVCL::init() 34 { 33 bool dataIO_extLinkVCL::init(xmlNode* configurationNode) 34 { 35 if (!configurationNode || !processXMLConfiguration(configurationNode)) 36 return false; 37 35 38 OSG_NOTIFY( osg::ALWAYS ) << "extLinkVCL init()" << std::endl; 36 39 37 VCLConfigFilename = "osgVisual.xml";38 39 40 if ( osgDB::fileExists( VCLConfigFilename ) ) 40 41 { … … 47 48 else 48 49 { 49 OSG_NOTIFY( osg::FATAL ) << "ERROR: Could not find VCL Configuration file " << VCLConfigFilename << std::endl; 50 exit(-1); 51 } 52 50 OSG_NOTIFY( osg::FATAL ) << "ERROR: Could not find VCL Configuration file '" << VCLConfigFilename << "', falling back to extLinkDummy" << std::endl; 51 return false; 52 } 53 return true; 54 } 55 56 bool dataIO_extLinkVCL::processXMLConfiguration(xmlNode* extLinkConfig_) 57 { 58 // Extract VCL config file 59 xmlAttr *attr = extLinkConfig_->properties; 60 while ( attr ) 61 { 62 std::string attr_name=reinterpret_cast<const char*>(attr->name); 63 std::string attr_value=reinterpret_cast<const char*>(attr->children->content); 64 if( attr_name == "implementation" ) 65 { 66 if(attr_value != "vcl") 67 { 68 OSG_NOTIFY( osg::ALWAYS ) << "WARNING: extLink configuration does not match the currently used 'vcl' implementation, falling back to extLinkDummy" << std::endl; 69 return false; 70 } 71 } 72 if( attr_name == "filename" ) 73 { 74 VCLConfigFilename = attr_value; 75 } 76 attr = attr->next; 77 } // WHILE attrib END 78 79 return true; 53 80 } 54 81
Note: See TracChangeset
for help on using the changeset viewer.