~ubuntu-branches/ubuntu/trusty/openscenegraph/trusty

« back to all changes in this revision

Viewing changes to OpenSceneGraph/src/osgPlugins/ac/ac3d.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Cyril Brulebois
  • Date: 2008-07-29 04:34:38 UTC
  • mfrom: (1.1.6 upstream) (2.1.3 lenny)
  • Revision ID: james.westby@ubuntu.com-20080729043438-no1h9h0dpsrlzp1y
* Non-maintainer upload.
* No longer try to detect (using /proc/cpuinfo when available) how many
  CPUs are available, fixing the FTBFS (due to -j0) on various platforms
  (Closes: #477353). The right way to do it is to support parallel=n in
  DEB_BUILD_OPTIONS (see Debian Policy §4.9.1), and adequate support has
  been implemented.
* Add patch to fix FTBFS due to the build system now refusing to handle
  whitespaces (Policy CMP0004 say the logs), thanks to Andreas Putzo who
  provided it (Closes: #482239):
   - debian/patches/fix-cmp0004-build-failure.dpatch
* Remove myself from Uploaders, as requested a while ago, done by Luk in
  his 2.2.0-2.1 NMU, which was never acknowledged.

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
                local_opt = static_cast<Options*>(options->clone(osg::CopyOp::DEEP_COPY_ALL));
99
99
            else
100
100
                local_opt = new Options;
101
 
            local_opt->setDatabasePath(osgDB::getFilePath(fileName));
 
101
            local_opt->getDatabasePathList().push_back(osgDB::getFilePath(fileName));
102
102
 
103
103
            ReadResult result = readNode(fin, local_opt.get());
104
104
            if (result.validNode())
1120
1120
        else if (token == "texture") {
1121
1121
            // read the texture name
1122
1122
            std::string texname = readString(stream);
1123
 
            
1124
 
            // strip the path to the texture, just look in the directory we read the ac file
1125
 
            std::string::size_type p = texname.rfind('\\');
1126
 
            if (p != std::string::npos)
1127
 
                texname = texname.substr(p+1, std::string::npos);
1128
 
            p = texname.rfind('/');
1129
 
            if (p != std::string::npos)
1130
 
                texname = texname.substr(p+1, std::string::npos);
 
1123
 
 
1124
            // strip absolute paths
 
1125
            if (texname[0] == '/' || isalpha(texname[0]) && texname[1] == ':') {
 
1126
                std::string::size_type p = texname.rfind('\\');
 
1127
                if (p != std::string::npos)
 
1128
                    texname = texname.substr(p+1, std::string::npos);
 
1129
                p = texname.rfind('/');
 
1130
                if (p != std::string::npos)
 
1131
                    texname = texname.substr(p+1, std::string::npos);
 
1132
            }
1131
1133
        
1132
1134
            textureData  = fileData.toTextureData(texname);
1133
1135
        }