Changeset 11498 for OpenSceneGraph/trunk/src/osgPlugins/ac/ac3d.cpp
- Timestamp:
- 05/28/10 18:30:36 (3 years ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/src/osgPlugins/ac/ac3d.cpp (modified) (17 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgPlugins/ac/ac3d.cpp
r11175 r11498 86 86 // GWM added Dec 2003 - get full path name (change in osgDB handling of files). 87 87 std::string fileName = osgDB::findDataFile( file, options ); 88 osg::notify(osg::INFO)<< "osgDB ac3d reader: starting reading \"" << fileName << "\"" << std::endl;88 OSG_INFO << "osgDB ac3d reader: starting reading \"" << fileName << "\"" << std::endl; 89 89 90 90 // Anders Backmann - correct return if path not found … … 177 177 } 178 178 else 179 osg::notify(osg::WARN)<<"File must start with a geode "<<std::endl;179 OSG_WARN<<"File must start with a geode "<<std::endl; 180 180 181 181 fout.flush(); … … 343 343 if (absFileName.empty()) 344 344 { 345 osg::notify(osg::FATAL)<< "osgDB ac3d reader: could not find texture \"" << name << "\"" << std::endl;345 OSG_FATAL << "osgDB ac3d reader: could not find texture \"" << name << "\"" << std::endl; 346 346 return false; 347 347 } … … 349 349 if (!mImage.valid()) 350 350 { 351 osg::notify(osg::FATAL)<< "osgDB ac3d reader: could not read texture \"" << name << "\"" << std::endl;351 OSG_FATAL << "osgDB ac3d reader: could not read texture \"" << name << "\"" << std::endl; 352 352 return false; 353 353 } … … 631 631 if (_vertices.size() <= i) 632 632 { 633 osg::notify(osg::FATAL)<< "osgDB ac3d reader: internal error, got invalid vertex index!" << std::endl;633 OSG_FATAL << "osgDB ac3d reader: internal error, got invalid vertex index!" << std::endl; 634 634 return VertexIndex(0, 0); 635 635 } … … 729 729 // Check if we have enough for a line or someting broken ... 730 730 if (nRefs < 2) { 731 osg::notify(osg::WARN)<< "osgDB ac3d reader: detected line with less than 2 vertices!" << std::endl;731 OSG_WARN << "osgDB ac3d reader: detected line with less than 2 vertices!" << std::endl; 732 732 return false; 733 733 } … … 753 753 type = osg::PrimitiveSet::LINE_STRIP; 754 754 else { 755 osg::notify(osg::FATAL)<< "osgDB ac3d reader: non surface flags in surface bin!" << std::endl;755 OSG_FATAL << "osgDB ac3d reader: non surface flags in surface bin!" << std::endl; 756 756 return false; 757 757 } … … 817 817 // Check if we have enough for a line or someting broken ... 818 818 if (nRefs < 3) { 819 osg::notify(osg::WARN)<< "osgDB ac3d reader: detected surface with less than 3 vertices!" << std::endl;819 OSG_WARN << "osgDB ac3d reader: detected surface with less than 3 vertices!" << std::endl; 820 820 return false; 821 821 } … … 1230 1230 1231 1231 if (token != "SURF") { 1232 osg::notify(osg::FATAL)<< "osgDB ac3d reader: expected SURF line while reading object \""1232 OSG_FATAL << "osgDB ac3d reader: expected SURF line while reading object \"" 1233 1233 << group->getName() << "\"!" << std::endl; 1234 1234 return group.release(); … … 1240 1240 stream >> token; 1241 1241 if (token != "mat") { 1242 osg::notify(osg::FATAL)<< "osgDB ac3d reader: expected mat line while reading object \""1242 OSG_FATAL << "osgDB ac3d reader: expected mat line while reading object \"" 1243 1243 << group->getName() << "\"!" << std::endl; 1244 1244 return group.release(); … … 1249 1249 stream >> matIdx; 1250 1250 if (primitiveBins.size() <= matIdx) { 1251 osg::notify(osg::FATAL)<< "osgDB ac3d reader: invalid material number while reading object \""1251 OSG_FATAL << "osgDB ac3d reader: invalid material number while reading object \"" 1252 1252 << group->getName() << "\"" << std::endl; 1253 1253 return group.release(); … … 1258 1258 primitiveBin = primitiveBins[matIdx].getOrCreatePrimitiveBin(flags, vertexSet.get()); 1259 1259 if (!primitiveBin) { 1260 osg::notify(osg::FATAL)<< "osgDB ac3d reader: unexpected primitive flags while reading object \""1260 OSG_FATAL << "osgDB ac3d reader: unexpected primitive flags while reading object \"" 1261 1261 << group->getName() << "\"" << std::endl; 1262 1262 return group.release(); … … 1266 1266 stream >> token; 1267 1267 if (token != "refs") { 1268 osg::notify(osg::FATAL)<< "osgDB ac3d reader: expected refs line while reading object \""1268 OSG_FATAL << "osgDB ac3d reader: expected refs line while reading object \"" 1269 1269 << group->getName() << "\"" << std::endl; 1270 1270 return group.release(); … … 1274 1274 stream >> nRefs; 1275 1275 if (!stream) { 1276 osg::notify(osg::FATAL)<< "osgDB ac3d reader: could not read number of refs while reading object \""1276 OSG_FATAL << "osgDB ac3d reader: could not read number of refs while reading object \"" 1277 1277 << group->getName() << "\"" << std::endl; 1278 1278 return group.release(); … … 1288 1288 if (vertexSet->size() <= index) 1289 1289 { 1290 osg::notify(osg::FATAL)<< "osgDB ac3d reader: invalid ref vertex index while reading object \""1290 OSG_FATAL << "osgDB ac3d reader: invalid ref vertex index while reading object \"" 1291 1291 << group->getName() << "\"" << std::endl; 1292 1292 return group.release(); … … 1297 1297 stream >> texCoord[0] >> texCoord[1]; 1298 1298 if (!stream) { 1299 osg::notify(osg::WARN)<< "osgDB ac3d reader: could not parse texture coords while reading object \""1299 OSG_WARN << "osgDB ac3d reader: could not parse texture coords while reading object \"" 1300 1300 << group->getName() << "\" setting to (0,0)" << std::endl; 1301 1301 stream.clear(); … … 1335 1335 osg::Node *k = readObject(stream, fileData, transform*parentTransform, textureData); 1336 1336 if (k == 0) { 1337 osg::notify(osg::FATAL)<< "osgDB ac3d reader: error reading child object" << std::endl;1337 OSG_FATAL << "osgDB ac3d reader: error reading child object" << std::endl; 1338 1338 return group.release(); 1339 1339 }
