Ignore:
Timestamp:
Nov 9, 2010, 10:37:40 PM (13 years ago)
Author:
Torben Dannhauer
Message:
 
File:
1 edited

Legend:

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

    r150 r151  
    4949        if(config)
    5050        {
    51        
     51                OSG_NOTIFY( osg::ALWAYS ) << "Using distortion." << std::endl;
     52
    5253                xmlNode* a_node = config->children;
    5354
     
    5556                {
    5657                        std::string node_name=reinterpret_cast<const char*>(cur_node->name);
    57                         OSG_ALWAYS << "----visual_distortion::processXMLConfiguration() - node type="<< cur_node->type <<", name=" << cur_node->name << std::endl;
     58                        //OSG_ALWAYS << "----visual_distortion::processXMLConfiguration() - node type="<< cur_node->type <<", name=" << cur_node->name << std::endl;
    5859
    5960                        // Check for distortion node
     
    6869                                        {
    6970                                                std::string  channelname = attr_value;
    70                                                 OSG_NOTIFY(osg::ALWAYS) << "channelname:" << channelname << std::endl;
     71                                                OSG_NOTIFY(osg::ALWAYS) << "visual_distortion: Channelname:" << channelname << std::endl;
    7172
    7273                                                std::string pre_cfg("..\\resources\\distortion\\view_");
     
    136137                                                distortMapFileName = attr_value;
    137138                                        }
    138 
    139139                                        attr = attr->next;
    140140                                }
     
    153153                                                blendMapFileName = attr_value;
    154154                                        }
    155 
    156155                                        attr = attr->next;
    157156                                }
     
    159158                }       // FOR all nodes END
    160159
    161 
     160                // clean up
     161                xmlFreeDoc(tmpDoc); xmlCleanupParser();
     162                return true;
    162163        }       // IF Config valid END
    163164        else
    164                 OSG_WARN << "ERROR: visual_distortion::processXMLConfiguration() - Invalid module configuration!" << std::endl;
    165 
    166 
    167 
    168         // clean up
    169         if(tmpDoc)
    170         {
    171                 xmlFreeDoc(tmpDoc); xmlCleanupParser();
    172                 return true;
     165        {
     166                OSG_WARN << "WARNING: visual_distortion::processXMLConfiguration() - Module configuration not found or module disabled!" << std::endl;
     167                return false;
    173168        }
     169
     170
    174171
    175172        return true;
     
    191188
    192189        // Process XML configuration
    193         processXMLConfiguration();
     190        if(!processXMLConfiguration())
     191                return NULL;    // Abort distortion initialization.
    194192
    195193        // Add this node to the scenegraph to get updated during update traversal.
Note: See TracChangeset for help on using the changeset viewer.