Changeset 125 for osgVisual/src/core
- Timestamp:
- Sep 2, 2010, 10:29:58 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
osgVisual/src/core/visual_core.cpp
r122 r125 251 251 } 252 252 253 void visual_core::parseConfigFile(osg::ArgumentParser& arguments_) 254 { 255 std::string filename; 256 if( arguments.read("-c", filename) || arguments.read("--config", filename) ) 257 { 258 if( osgDB::fileExists(filename) ) 259 { 260 configFileValid = false; 261 xmlDoc *doc = NULL; 262 xmlNode *root_element = NULL; 263 264 doc = xmlReadFile(filename.c_str(), NULL, 0); 265 if (doc == NULL) 266 { 267 configFileValid = false; 268 OSG_ALWAYS << "visual_core::parseConfigFile() - ERROR: could not parse osgVisual config file" << filename << std::endl; 269 } 270 else 271 { 272 // Get the root element node 273 root_element = xmlDocGetRootElement(doc); 274 275 // Parse the XML document. 276 277 278 // free the document 279 xmlFreeDoc(doc);; 280 } 281 // Free the global variables that may have been allocated by the parser. 282 xmlCleanupParser(); 283 284 if(!configFileValid) 285 OSG_ALWAYS << "visual_core::parseConfigFile() - ERROR: XML file seems not to be a valid osgVisual configuration file!" << std::endl; 286 287 } // IF configfile exists 288 } // IF -c END 289 } 290 291 void visual_core::checkXMLNode(xmlNode * a_node) 292 { 293 294 } 295 296 void visual_core::parseScenery(xmlNode * a_node) 297 { 298 299 } 253 300 254 301 bool visual_core::checkCommandlineArgumentsForFinalErrors() … … 301 348 //addWindVolume( 0.0, 15000.0, 300.0, 90.0 ); 302 349 303 //sky->addCloudLayer( 0, 300000, 300000, 600.0, 2351.0, 0.5, STRATUS );350 sky->addCloudLayer( 0, 300000, 300000, 600.0, 2351.0, 0.5, STRATUS ); 304 351 //sky->addCloudLayer( 0, 5000000, 5000000, 600.0, 7351.0, 0.2, CIRRUS_FIBRATUS ); 305 352 //sky->addCloudLayer( 0, 50000, 50000, 600.0, 7351.0, 0.2, CIRROCUMULUS );
Note: See TracChangeset
for help on using the changeset viewer.