Ignore:
Timestamp:
Nov 9, 2010, 10:56:41 PM (14 years ago)
Author:
Torben Dannhauer
Message:

Silverlining, Distortion now uses XMl configuration file for configuration.

Todo: vista2D and the whole dataIO tree.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • osgVisual/src/distortion/visual_distortion.cpp

    r151 r152  
    4444        // Init XML
    4545        xmlDoc* tmpDoc;
    46         xmlNode* config = util::getModuleXMLConfig( configFileName, "distortion", tmpDoc );
     46        bool disabled;
     47        xmlNode* config = util::getModuleXMLConfig( configFileName, "distortion", tmpDoc, disabled );
     48
     49        if( disabled)
     50        {
     51                OSG_NOTIFY( osg::ALWAYS ) << "..disabled by XML configuration file." << std::endl;
     52                return false;
     53        }
    4754       
    4855        // extract configuration values
    4956        if(config)
    5057        {
    51                 OSG_NOTIFY( osg::ALWAYS ) << "Using distortion." << std::endl;
     58                OSG_NOTIFY( osg::ALWAYS ) << "..using distortion." << std::endl;
    5259
    5360                xmlNode* a_node = config->children;
     
    164171        else
    165172        {
    166                 OSG_WARN << "WARNING: visual_distortion::processXMLConfiguration() - Module configuration not found or module disabled!" << std::endl;
     173                OSG_WARN << "ERROR: visual_distortion::processXMLConfiguration() - Module configuration not found" << std::endl;
    167174                return false;
    168175        }
     
    175182osg::Group* visual_distortion::initialize(osg::Group* subgraph, const osg::Vec4& clearColor )
    176183{
    177         OSG_NOTIFY (osg::ALWAYS ) << "visual_distortion initialize..." << std::endl;
     184        OSG_NOTIFY (osg::ALWAYS ) << "visual_distortion initialize..";  // The sentence is finished by the init result...
    178185
    179186        // Initialize variables:
Note: See TracChangeset for help on using the changeset viewer.