Converted osg::notify to OSG_INFO

This commit is contained in:
Robert Osfield
2010-05-28 16:27:37 +00:00
parent a7da775353
commit 805a78c3b5
3 changed files with 39 additions and 39 deletions

View File

@@ -407,7 +407,7 @@ void ObjPrimitiveIndexWriter::drawArrays(GLenum mode,GLint first,GLsizei count)
break;
}
default:
osg::notify(osg::WARN) << "OBJWriterNodeVisitor :: can't handle mode " << mode << std::endl;
OSG_WARN << "OBJWriterNodeVisitor :: can't handle mode " << mode << std::endl;
break;
}
}

View File

@@ -240,7 +240,7 @@ static void load_material_texture( obj::Model &model,
if ( image->isImageTranslucent())
{
osg::notify(osg::INFO)<<"Found transparent image"<<std::endl;
OSG_INFO<<"Found transparent image"<<std::endl;
stateset->setMode(GL_BLEND, osg::StateAttribute::ON);
stateset->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
}
@@ -253,12 +253,12 @@ static void load_material_texture( obj::Model &model,
osg::Matrix mat;
if (map.uScale != 1.0f || map.vScale != 1.0f)
{
osg::notify(osg::DEBUG_INFO) << "Obj TexMat scale=" << map.uScale << "," << map.vScale << std::endl;
OSG_DEBUG << "Obj TexMat scale=" << map.uScale << "," << map.vScale << std::endl;
mat *= osg::Matrix::scale(map.uScale, map.vScale, 1.0);
}
if (map.uOffset != 0.0f || map.vOffset != 0.0f)
{
osg::notify(osg::DEBUG_INFO) << "Obj TexMat offset=" << map.uOffset << "," << map.uOffset << std::endl;
OSG_DEBUG << "Obj TexMat offset=" << map.uOffset << "," << map.uOffset << std::endl;
mat *= osg::Matrix::translate(map.uOffset, map.vOffset, 0.0);
}
@@ -343,7 +343,7 @@ void ReaderWriterOBJ::buildMaterialToStateSetMap(obj::Model& model, MaterialToSt
material.specular[3]!=1.0||
material.emissive[3]!=1.0)
{
osg::notify(osg::INFO)<<"Found transparent material"<<std::endl;
OSG_INFO<<"Found transparent material"<<std::endl;
isTransparent = true;
}
}
@@ -473,13 +473,13 @@ osg::Geometry* ReaderWriterOBJ::convertElementListToGeometry(obj::Model& model,
if (numNormalIndices!=0 && numNormalIndices!=numVertexIndices)
{
osg::notify(osg::NOTICE)<<"Incorrect number of normals, ignore them"<<std::endl;
OSG_NOTICE<<"Incorrect number of normals, ignore them"<<std::endl;
numNormalIndices = 0;
}
if (numTexCoordIndices!=0 && numTexCoordIndices!=numVertexIndices)
{
osg::notify(osg::NOTICE)<<"Incorrect number of normals, ignore them"<<std::endl;
OSG_NOTICE<<"Incorrect number of normals, ignore them"<<std::endl;
numTexCoordIndices = 0;
}
@@ -728,7 +728,7 @@ osg::Node* ReaderWriterOBJ::convertModelToSceneGraph(obj::Model& model, ObjOptio
MaterialToStateSetMap::const_iterator it = materialToStateSetMap.find(es.materialName);
if (it == materialToStateSetMap.end())
{
osg::notify(osg::WARN) << "Obj unable to find material '" << es.materialName << "'" << std::endl;
OSG_WARN << "Obj unable to find material '" << es.materialName << "'" << std::endl;
}
osg::StateSet* stateset = materialToStateSetMap[es.materialName].get();
@@ -843,7 +843,7 @@ ReaderWriterOBJ::ObjOptionsStruct ReaderWriterOBJ::parseOptions(const osgDB::Rea
{
int unit = atoi(post_equals.c_str()); // (probably should use istringstream rather than atoi)
localOptions.textureUnitAllocation.push_back(std::make_pair(unit,(obj::Material::Map::TextureMapType) type));
osg::notify(osg::NOTICE)<<"Obj Found map in options, ["<<pre_equals<<"]="<<unit<<std::endl;
OSG_NOTICE<<"Obj Found map in options, ["<<pre_equals<<"]="<<unit<<std::endl;
}
}
}

View File

@@ -92,7 +92,7 @@ static Material::Map parseTextureMap( const std::string& ss, Material::Map::Text
}
else if (s.compare(1,5,"clamp")==0)
{
osg::notify(osg::NOTICE)<<"Got Clamp\n";
OSG_NOTICE<<"Got Clamp\n";
char c[4];
if (sscanf(s.c_str(), "%*s %3s%n", c, &n) != 1)
{
@@ -133,7 +133,7 @@ bool Model::readline(std::istream& fin, char* line, const int LINE_SIZE)
{
// we have a windows line endings.
fin.get();
// osg::notify(osg::NOTICE)<<"We have dos line ending"<<std::endl;
// OSG_NOTICE<<"We have dos line ending"<<std::endl;
if (skipNewline)
{
skipNewline = false;
@@ -143,7 +143,7 @@ bool Model::readline(std::istream& fin, char* line, const int LINE_SIZE)
else break;
}
// we have Mac line ending
// osg::notify(osg::NOTICE)<<"We have mac line ending"<<std::endl;
// OSG_NOTICE<<"We have mac line ending"<<std::endl;
if (skipNewline)
{
skipNewline = false;
@@ -155,7 +155,7 @@ bool Model::readline(std::istream& fin, char* line, const int LINE_SIZE)
else if (c=='\n')
{
// we have unix line ending.
// osg::notify(osg::NOTICE)<<"We have unix line ending"<<std::endl;
// OSG_NOTICE<<"We have unix line ending"<<std::endl;
if (skipNewline)
{
*ptr++ = ' ';
@@ -215,7 +215,7 @@ std::string Model::lastComponent(const char* linep)
bool Model::readMTL(std::istream& fin)
{
osg::notify(osg::INFO)<<"Reading MTL file"<<std::endl;
OSG_INFO<<"Reading MTL file"<<std::endl;
const int LINE_SIZE = 4096;
char line[LINE_SIZE];
@@ -230,7 +230,7 @@ bool Model::readMTL(std::istream& fin)
if (line[0]=='#' || line[0]=='$')
{
// comment line
// osg::notify(osg::NOTICE) <<"Comment: "<<line<<std::endl;
// OSG_NOTICE <<"Comment: "<<line<<std::endl;
}
else if (strlen(line)>0)
{
@@ -488,12 +488,12 @@ bool Model::readMTL(std::istream& fin)
}
else
{
osg::notify(osg::NOTICE) <<"*** line not handled *** :"<<line<<std::endl;
OSG_NOTICE <<"*** line not handled *** :"<<line<<std::endl;
}
}
else
{
osg::notify(osg::NOTICE) <<"*** line not handled *** :"<<line<<std::endl;
OSG_NOTICE <<"*** line not handled *** :"<<line<<std::endl;
}
}
@@ -516,7 +516,7 @@ std::string trim(const std::string& s)
bool Model::readOBJ(std::istream& fin, const osgDB::ReaderWriter::Options* options)
{
osg::notify(osg::INFO)<<"Reading OBJ file"<<std::endl;
OSG_INFO<<"Reading OBJ file"<<std::endl;
const int LINE_SIZE = 4096;
char line[LINE_SIZE];
@@ -528,7 +528,7 @@ bool Model::readOBJ(std::istream& fin, const osgDB::ReaderWriter::Options* optio
if (line[0]=='#' || line[0]=='$')
{
// comment line
// osg::notify(osg::NOTICE) <<"Comment: "<<line<<std::endl;
// OSG_NOTICE <<"Comment: "<<line<<std::endl;
}
else if (strlen(line)>0)
{
@@ -567,7 +567,7 @@ bool Model::readOBJ(std::istream& fin, const osgDB::ReaderWriter::Options* optio
(line[0]=='l') ? Element::POLYLINE :
Element::POLYGON );
// osg::notify(osg::NOTICE)<<"face"<<ptr<<std::endl;
// OSG_NOTICE<<"face"<<ptr<<std::endl;
int vi=0, ti=0, ni=0;
while(*ptr!=0)
@@ -577,26 +577,26 @@ bool Model::readOBJ(std::istream& fin, const osgDB::ReaderWriter::Options* optio
if (sscanf(ptr, "%d/%d/%d", &vi, &ti, &ni) == 3)
{
// osg::notify(osg::NOTICE)<<" vi="<<vi<<"/ti="<<ti<<"/ni="<<ni<<std::endl;
// OSG_NOTICE<<" vi="<<vi<<"/ti="<<ti<<"/ni="<<ni<<std::endl;
element->vertexIndices.push_back(remapVertexIndex(vi));
element->normalIndices.push_back(remapNormalIndex(ni));
element->texCoordIndices.push_back(remapTexCoordIndex(ti));
}
else if (sscanf(ptr, "%d//%d", &vi, &ni) == 2)
{
// osg::notify(osg::NOTICE)<<" vi="<<vi<<"//ni="<<ni<<std::endl;
// OSG_NOTICE<<" vi="<<vi<<"//ni="<<ni<<std::endl;
element->vertexIndices.push_back(remapVertexIndex(vi));
element->normalIndices.push_back(remapNormalIndex(ni));
}
else if (sscanf(ptr, "%d/%d", &vi, &ti) == 2)
{
// osg::notify(osg::NOTICE)<<" vi="<<vi<<"/ti="<<ti<<std::endl;
// OSG_NOTICE<<" vi="<<vi<<"/ti="<<ti<<std::endl;
element->vertexIndices.push_back(remapVertexIndex(vi));
element->texCoordIndices.push_back(remapTexCoordIndex(ti));
}
else if (sscanf(ptr, "%d", &vi) == 1)
{
// osg::notify(osg::NOTICE)<<" vi="<<vi<<std::endl;
// OSG_NOTICE<<" vi="<<vi<<std::endl;
element->vertexIndices.push_back(remapVertexIndex(vi));
}
@@ -650,17 +650,17 @@ bool Model::readOBJ(std::istream& fin, const osgDB::ReaderWriter::Options* optio
osgDB::ifstream mfin( fullPathFileName.c_str() );
if (mfin)
{
osg::notify(osg::INFO) << "Obj reading mtllib '" << fullPathFileName << "'\n";
OSG_INFO << "Obj reading mtllib '" << fullPathFileName << "'\n";
readMTL(mfin);
}
else
{
osg::notify(osg::WARN) << "Obj unable to load mtllib '" << fullPathFileName << "'\n";
OSG_WARN << "Obj unable to load mtllib '" << fullPathFileName << "'\n";
}
}
else
{
osg::notify(osg::WARN) << "Obj unable to find mtllib '" << materialFileName << "'\n";
OSG_WARN << "Obj unable to find mtllib '" << materialFileName << "'\n";
}
}
else if (strncmp(line,"o ",2)==0)
@@ -713,18 +713,18 @@ bool Model::readOBJ(std::istream& fin, const osgDB::ReaderWriter::Options* optio
}
else
{
osg::notify(osg::NOTICE) <<"*** line not handled *** :"<<line<<std::endl;
OSG_NOTICE <<"*** line not handled *** :"<<line<<std::endl;
}
}
}
#if 0
osg::notify(osg::NOTICE) <<"vertices :"<<vertices.size()<<std::endl;
osg::notify(osg::NOTICE) <<"normals :"<<normals.size()<<std::endl;
osg::notify(osg::NOTICE) <<"texcoords :"<<texcoords.size()<<std::endl;
osg::notify(osg::NOTICE) <<"materials :"<<materialMap.size()<<std::endl;
osg::notify(osg::NOTICE) <<"elementStates :"<<elementStateMap.size()<<std::endl;
OSG_NOTICE <<"vertices :"<<vertices.size()<<std::endl;
OSG_NOTICE <<"normals :"<<normals.size()<<std::endl;
OSG_NOTICE <<"texcoords :"<<texcoords.size()<<std::endl;
OSG_NOTICE <<"materials :"<<materialMap.size()<<std::endl;
OSG_NOTICE <<"elementStates :"<<elementStateMap.size()<<std::endl;
unsigned int pos=0;
for(ElementStateMap::iterator itr=elementStateMap.begin();
@@ -733,12 +733,12 @@ bool Model::readOBJ(std::istream& fin, const osgDB::ReaderWriter::Options* optio
{
const ElementState& es = itr->first;
ElementList& el = itr->second;
osg::notify(osg::NOTICE)<<"ElementState "<<pos<<std::endl;
osg::notify(osg::NOTICE)<<" es.objectName="<<es.objectName<<std::endl;
osg::notify(osg::NOTICE)<<" es.groupName="<<es.groupName<<std::endl;
osg::notify(osg::NOTICE)<<" es.materialName="<<es.materialName<<std::endl;
osg::notify(osg::NOTICE)<<" es.smoothGroup="<<es.smoothingGroup<<std::endl;
osg::notify(osg::NOTICE)<<" ElementList ="<<el.size()<<std::endl;
OSG_NOTICE<<"ElementState "<<pos<<std::endl;
OSG_NOTICE<<" es.objectName="<<es.objectName<<std::endl;
OSG_NOTICE<<" es.groupName="<<es.groupName<<std::endl;
OSG_NOTICE<<" es.materialName="<<es.materialName<<std::endl;
OSG_NOTICE<<" es.smoothGroup="<<es.smoothingGroup<<std::endl;
OSG_NOTICE<<" ElementList ="<<el.size()<<std::endl;
}
#endif