updates for windows build.
This commit is contained in:
@@ -55,10 +55,10 @@ bool Matrix_writeLocalData(const Object& obj, Output& fw)
|
||||
{
|
||||
const Matrix& matrix = static_cast<const Matrix&>(obj);
|
||||
|
||||
fw.indent() << matrix(0,0) << " " << matrix(0,1) << " " << matrix(0,2) << " " << matrix(0,3) << endl;
|
||||
fw.indent() << matrix(1,0) << " " << matrix(1,1) << " " << matrix(1,2) << " " << matrix(1,3) << endl;
|
||||
fw.indent() << matrix(2,0) << " " << matrix(2,1) << " " << matrix(2,2) << " " << matrix(2,3) << endl;
|
||||
fw.indent() << matrix(3,0) << " " << matrix(3,1) << " " << matrix(3,2) << " " << matrix(3,3) << endl;
|
||||
fw.indent() << matrix(0,0) << " " << matrix(0,1) << " " << matrix(0,2) << " " << matrix(0,3) << std::endl;
|
||||
fw.indent() << matrix(1,0) << " " << matrix(1,1) << " " << matrix(1,2) << " " << matrix(1,3) << std::endl;
|
||||
fw.indent() << matrix(2,0) << " " << matrix(2,1) << " " << matrix(2,2) << " " << matrix(2,3) << std::endl;
|
||||
fw.indent() << matrix(3,0) << " " << matrix(3,1) << " " << matrix(3,2) << " " << matrix(3,3) << std::endl;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ bool Node_readLocalData(Object& obj, Input& fr)
|
||||
|
||||
// if (fr.matchSequence("user_data {"))
|
||||
// {
|
||||
// notify(DEBUG) << "Matched user_data {"<<endl;
|
||||
// notify(DEBUG) << "Matched user_data {"<< std::endl;
|
||||
// int entry = fr[0].getNoNestedBrackets();
|
||||
// fr += 2;
|
||||
//
|
||||
@@ -60,7 +60,7 @@ bool Node_readLocalData(Object& obj, Input& fr)
|
||||
// {
|
||||
// Object* object = fr.readObject();
|
||||
// if (object) setUserData(object);
|
||||
// notify(DEBUG) << "read "<<object<<endl;
|
||||
// notify(DEBUG) << "read "<<object<< std::endl;
|
||||
// ++fr;
|
||||
// }
|
||||
// iteratorAdvanced = true;
|
||||
@@ -103,22 +103,22 @@ bool Node_writeLocalData(const Object& obj, Output& fw)
|
||||
{
|
||||
const Node& node = static_cast<const Node&>(obj);
|
||||
|
||||
if (!node.getName().empty()) fw.indent() << "name "<<'"'<<node.getName()<<'"'<<endl;
|
||||
if (!node.getName().empty()) fw.indent() << "name "<<'"'<<node.getName()<<'"'<< std::endl;
|
||||
|
||||
fw.indent() << "cullingActive ";
|
||||
if (node.getCullingActive()) fw << "TRUE"<<endl;
|
||||
else fw << "FALSE"<<endl;
|
||||
if (node.getCullingActive()) fw << "TRUE"<< std::endl;
|
||||
else fw << "FALSE"<< std::endl;
|
||||
|
||||
// if (_userData)
|
||||
// {
|
||||
// Object* object = dynamic_cast<Object*>(_userData);
|
||||
// if (object)
|
||||
// {
|
||||
// fw.indent() << "user_data {"<<endl;
|
||||
// fw.indent() << "user_data {"<< std::endl;
|
||||
// fw.moveIn();
|
||||
// object->write(fw);
|
||||
// fw.moveOut();
|
||||
// fw.indent() << "}"<<endl;
|
||||
// fw.indent() << "}"<< std::endl;
|
||||
// }
|
||||
// }
|
||||
|
||||
@@ -126,20 +126,20 @@ bool Node_writeLocalData(const Object& obj, Output& fw)
|
||||
{
|
||||
if (node.getDescriptions().size()==1)
|
||||
{
|
||||
fw.indent() << "description "<<'"'<<node.getDescriptions().front()<<'"'<<endl;
|
||||
fw.indent() << "description "<<'"'<<node.getDescriptions().front()<<'"'<< std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
fw.indent() << "description {"<<endl;
|
||||
fw.indent() << "description {"<< std::endl;
|
||||
fw.moveIn();
|
||||
for(Node::DescriptionList::const_iterator ditr=node.getDescriptions().begin();
|
||||
ditr!=node.getDescriptions().end();
|
||||
++ditr)
|
||||
{
|
||||
fw.indent() << '"'<<*ditr<<'"'<<endl;
|
||||
fw.indent() << '"'<<*ditr<<'"'<< std::endl;
|
||||
}
|
||||
fw.moveOut();
|
||||
fw.indent() << "}"<<endl;
|
||||
fw.indent() << "}"<< std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,8 +67,8 @@ bool Point_writeLocalData(const Object& obj, Output& fw)
|
||||
{
|
||||
const Point& point = static_cast<const Point&>(obj);
|
||||
|
||||
fw.indent() << "size " << point.getSize() << endl;
|
||||
fw.indent() << "fade_threshold_size " << point.getFadeThresholdSize() << endl;
|
||||
fw.indent() << "distance_attenuation " << point.getDistanceAttenuation() << endl;
|
||||
fw.indent() << "size " << point.getSize() << std::endl;
|
||||
fw.indent() << "fade_threshold_size " << point.getFadeThresholdSize() << std::endl;
|
||||
fw.indent() << "distance_attenuation " << point.getDistanceAttenuation() << std::endl;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -65,24 +65,24 @@ bool PolygonMode_writeLocalData(const Object& obj, Output& fw)
|
||||
{
|
||||
switch(polygonmode.getMode(PolygonMode::FRONT))
|
||||
{
|
||||
case(PolygonMode::POINT): fw.indent() << "mode FRONT_AND_BACK POINT" << endl; break;
|
||||
case(PolygonMode::LINE): fw.indent() << "mode FRONT_AND_BACK LINE" << endl; break;
|
||||
case(PolygonMode::FILL): fw.indent() << "mode FRONT_AND_BACK FILL" << endl; break;
|
||||
case(PolygonMode::POINT): fw.indent() << "mode FRONT_AND_BACK POINT" << std::endl; break;
|
||||
case(PolygonMode::LINE): fw.indent() << "mode FRONT_AND_BACK LINE" << std::endl; break;
|
||||
case(PolygonMode::FILL): fw.indent() << "mode FRONT_AND_BACK FILL" << std::endl; break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch(polygonmode.getMode(PolygonMode::FRONT))
|
||||
{
|
||||
case(PolygonMode::POINT): fw.indent() << "mode FRONT POINT" << endl; break;
|
||||
case(PolygonMode::LINE): fw.indent() << "mode FRONT LINE" << endl; break;
|
||||
case(PolygonMode::FILL): fw.indent() << "mode FRONT FILL" << endl; break;
|
||||
case(PolygonMode::POINT): fw.indent() << "mode FRONT POINT" << std::endl; break;
|
||||
case(PolygonMode::LINE): fw.indent() << "mode FRONT LINE" << std::endl; break;
|
||||
case(PolygonMode::FILL): fw.indent() << "mode FRONT FILL" << std::endl; break;
|
||||
}
|
||||
switch(polygonmode.getMode(PolygonMode::BACK))
|
||||
{
|
||||
case(PolygonMode::POINT): fw.indent() << "mode BACK POINT" << endl; break;
|
||||
case(PolygonMode::LINE): fw.indent() << "mode BACK LINE" << endl; break;
|
||||
case(PolygonMode::FILL): fw.indent() << "mode BACK FILL" << endl; break;
|
||||
case(PolygonMode::POINT): fw.indent() << "mode BACK POINT" << std::endl; break;
|
||||
case(PolygonMode::LINE): fw.indent() << "mode BACK LINE" << std::endl; break;
|
||||
case(PolygonMode::FILL): fw.indent() << "mode BACK FILL" << std::endl; break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ bool PolygonOffset_writeLocalData(const Object& obj, Output& fw)
|
||||
{
|
||||
const PolygonOffset& polygonoffset = static_cast<const PolygonOffset&>(obj);
|
||||
|
||||
fw.indent() << "factor " << polygonoffset.getFactor() << endl;
|
||||
fw.indent() << "units " << polygonoffset.getUnits() << endl;
|
||||
fw.indent() << "factor " << polygonoffset.getFactor() << std::endl;
|
||||
fw.indent() << "units " << polygonoffset.getUnits() << std::endl;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ class OSGReaderWriter : public ReaderWriter
|
||||
std::string ext = getFileExtension(fileName);
|
||||
if (!acceptsExtension(ext)) return ReadResult::FILE_NOT_HANDLED;
|
||||
|
||||
ifstream fin(fileName.c_str());
|
||||
std::ifstream fin(fileName.c_str());
|
||||
if (fin)
|
||||
{
|
||||
Input fr;
|
||||
|
||||
@@ -97,7 +97,7 @@ void initGLNames()
|
||||
// itr!=s_GLNameToGLModeMap.end();
|
||||
// ++itr)
|
||||
// {
|
||||
// cout << "Name ["<<itr->first<<","<<itr->second<<"]"<<endl;
|
||||
// cout << "Name ["<<itr->first<<","<<itr->second<<"]"<< std::endl;
|
||||
// }
|
||||
|
||||
first_time = false;
|
||||
@@ -356,24 +356,24 @@ bool StateSet_writeLocalData(const Object& obj, Output& fw)
|
||||
switch(stateset.getRenderingHint())
|
||||
{
|
||||
case(StateSet::DEFAULT_BIN):
|
||||
fw<<"DEFAULT_BIN"<<endl;
|
||||
fw<<"DEFAULT_BIN"<< std::endl;
|
||||
break;
|
||||
case(StateSet::OPAQUE_BIN):
|
||||
fw<<"OPAQUE_BIN"<<endl;
|
||||
fw<<"OPAQUE_BIN"<< std::endl;
|
||||
break;
|
||||
case(StateSet::TRANSPARENT_BIN):
|
||||
fw<<"TRANSPARENT_BIN"<<endl;
|
||||
fw<<"TRANSPARENT_BIN"<< std::endl;
|
||||
break;
|
||||
default:
|
||||
fw<<stateset.getRenderingHint()<<endl;
|
||||
fw<<stateset.getRenderingHint()<< std::endl;
|
||||
break;
|
||||
}
|
||||
|
||||
fw.indent()<<"renderBinMode "<<StateSet_getRenderBinModeStr(stateset.getRenderBinMode())<<endl;
|
||||
fw.indent()<<"renderBinMode "<<StateSet_getRenderBinModeStr(stateset.getRenderBinMode())<< std::endl;
|
||||
if (stateset.getRenderBinMode()!=StateSet::INHERIT_RENDERBIN_DETAILS)
|
||||
{
|
||||
fw.indent()<<"binNumber "<<stateset.getBinNumber()<<endl;
|
||||
fw.indent()<<"binName "<<stateset.getBinName()<<endl;
|
||||
fw.indent()<<"binNumber "<<stateset.getBinNumber()<< std::endl;
|
||||
fw.indent()<<"binName "<<stateset.getBinName()<< std::endl;
|
||||
}
|
||||
|
||||
|
||||
@@ -387,12 +387,12 @@ bool StateSet_writeLocalData(const Object& obj, Output& fw)
|
||||
GLModeToGLNameMap::iterator nitr = s_GLModeToGLNameMap.find(mitr->first);
|
||||
if (nitr!=s_GLModeToGLNameMap.end())
|
||||
{
|
||||
fw.indent() << nitr->second << " " << StateSet_getModeStr(mitr->second) << endl;
|
||||
fw.indent() << nitr->second << " " << StateSet_getModeStr(mitr->second) << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
// no name defined for GLMode so just pass its value to fw.
|
||||
fw.indent() << "0x" << std::hex << (osg::uint)mitr->first << std::dec <<" " << StateSet_getModeStr(mitr->second) << endl;
|
||||
fw.indent() << "0x" << std::hex << (osg::uint)mitr->first << std::dec <<" " << StateSet_getModeStr(mitr->second) << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -104,15 +104,15 @@ bool Stencil_writeLocalData(const Object& obj,Output& fw)
|
||||
{
|
||||
const Stencil& stencil = static_cast<const Stencil&>(obj);
|
||||
|
||||
fw.indent() << "function " << Stencil_getFuncStr(stencil.getFunction()) << endl;
|
||||
fw.indent() << "functionRef " << stencil.getFunctionRef() << endl;
|
||||
fw.indent() << "functionMask 0x" << std::hex << stencil.getFunctionMask() << std::dec << endl;
|
||||
fw.indent() << "function " << Stencil_getFuncStr(stencil.getFunction()) << std::endl;
|
||||
fw.indent() << "functionRef " << stencil.getFunctionRef() << std::endl;
|
||||
fw.indent() << "functionMask 0x" << std::hex << stencil.getFunctionMask() << std::dec << std::endl;
|
||||
|
||||
fw.indent() << "stencilFailOperation " << Stencil_getOperationStr(stencil.getStencilFailOperation()) << endl;
|
||||
fw.indent() << "stencilPassAndDepthFailOperation " << Stencil_getOperationStr(stencil.getStencilPassAndDepthFailOperation()) << endl;
|
||||
fw.indent() << "stencilPassAndDepthPassOperation " << Stencil_getOperationStr(stencil.getStencilPassAndDepthPassOperation()) << endl;
|
||||
fw.indent() << "stencilFailOperation " << Stencil_getOperationStr(stencil.getStencilFailOperation()) << std::endl;
|
||||
fw.indent() << "stencilPassAndDepthFailOperation " << Stencil_getOperationStr(stencil.getStencilPassAndDepthFailOperation()) << std::endl;
|
||||
fw.indent() << "stencilPassAndDepthPassOperation " << Stencil_getOperationStr(stencil.getStencilPassAndDepthPassOperation()) << std::endl;
|
||||
|
||||
fw.indent() << "writeMask 0x" << std::hex << stencil.getWriteMask() << std::dec << endl;
|
||||
fw.indent() << "writeMask 0x" << std::hex << stencil.getWriteMask() << std::dec << std::endl;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -62,9 +62,9 @@ bool Switch_writeLocalData(const Object& obj, Output& fw)
|
||||
fw.indent() << "value ";
|
||||
switch(sw.getValue())
|
||||
{
|
||||
case(Switch::ALL_CHILDREN_ON): fw<<"ALL_CHILDREN_ON"<<endl;break;
|
||||
case(Switch::ALL_CHILDREN_OFF): fw<<"ALL_CHILDREN_OFF"<<endl;break;
|
||||
default: fw<<sw.getValue()<<endl;break;
|
||||
case(Switch::ALL_CHILDREN_ON): fw<<"ALL_CHILDREN_ON"<< std::endl;break;
|
||||
case(Switch::ALL_CHILDREN_OFF): fw<<"ALL_CHILDREN_OFF"<< std::endl;break;
|
||||
default: fw<<sw.getValue()<< std::endl;break;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -45,7 +45,7 @@ bool TexEnv_writeLocalData(const Object& obj, Output& fw)
|
||||
{
|
||||
const TexEnv& texenv = static_cast<const TexEnv&>(obj);
|
||||
|
||||
fw.indent() << "mode " << TexEnv_getModeStr(texenv.getMode()) << endl;
|
||||
fw.indent() << "mode " << TexEnv_getModeStr(texenv.getMode()) << std::endl;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -115,13 +115,13 @@ bool TexGen_writeLocalData(const Object& obj, Output& fw)
|
||||
{
|
||||
const TexGen& texgen = static_cast<const TexGen&>(obj);
|
||||
|
||||
fw.indent() << "mode " << TexGen_getModeStr(texgen.getMode()) << endl;
|
||||
fw.indent() << "mode " << TexGen_getModeStr(texgen.getMode()) << std::endl;
|
||||
if (texgen.getMode() == TexGen::OBJECT_LINEAR || texgen.getMode() == TexGen::EYE_LINEAR)
|
||||
{
|
||||
fw.indent() << "plane_s " << texgen.getPlane(TexGen::S) << endl;
|
||||
fw.indent() << "plane_t " << texgen.getPlane(TexGen::T) << endl;
|
||||
fw.indent() << "plane_r " << texgen.getPlane(TexGen::R) << endl;
|
||||
fw.indent() << "plane_q " << texgen.getPlane(TexGen::Q) << endl;
|
||||
fw.indent() << "plane_s " << texgen.getPlane(TexGen::S) << std::endl;
|
||||
fw.indent() << "plane_t " << texgen.getPlane(TexGen::T) << std::endl;
|
||||
fw.indent() << "plane_r " << texgen.getPlane(TexGen::R) << std::endl;
|
||||
fw.indent() << "plane_q " << texgen.getPlane(TexGen::Q) << std::endl;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -59,9 +59,9 @@ bool TexMat_writeLocalData(const Object& obj, Output& fw)
|
||||
{
|
||||
const TexMat& texmat = static_cast<const TexMat&>(obj);
|
||||
const Matrix& matrix = texmat.getMatrix();
|
||||
fw.indent() << matrix(0,0) << " " << matrix(0,1) << " " << matrix(0,2) << " " << matrix(0,3) << endl;
|
||||
fw.indent() << matrix(1,0) << " " << matrix(1,1) << " " << matrix(1,2) << " " << matrix(1,3) << endl;
|
||||
fw.indent() << matrix(2,0) << " " << matrix(2,1) << " " << matrix(2,2) << " " << matrix(2,3) << endl;
|
||||
fw.indent() << matrix(3,0) << " " << matrix(3,1) << " " << matrix(3,2) << " " << matrix(3,3) << endl;
|
||||
fw.indent() << matrix(0,0) << " " << matrix(0,1) << " " << matrix(0,2) << " " << matrix(0,3) << std::endl;
|
||||
fw.indent() << matrix(1,0) << " " << matrix(1,1) << " " << matrix(1,2) << " " << matrix(1,3) << std::endl;
|
||||
fw.indent() << matrix(2,0) << " " << matrix(2,1) << " " << matrix(2,2) << " " << matrix(2,3) << std::endl;
|
||||
fw.indent() << matrix(3,0) << " " << matrix(3,1) << " " << matrix(3,2) << " " << matrix(3,3) << std::endl;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -139,31 +139,31 @@ bool Texture_writeLocalData(const Object& obj, Output& fw)
|
||||
|
||||
if (texture.getImage() && !(texture.getImage()->getFileName().empty()))
|
||||
{
|
||||
fw.indent() << "file \""<<fw.getFileNameForOutput(texture.getImage()->getFileName())<<"\""<<endl;
|
||||
fw.indent() << "file \""<<fw.getFileNameForOutput(texture.getImage()->getFileName())<<"\""<< std::endl;
|
||||
}
|
||||
|
||||
fw.indent() << "wrap_s " << Texture_getWrapStr(texture.getWrap(Texture::WRAP_S)) << endl;
|
||||
fw.indent() << "wrap_t " << Texture_getWrapStr(texture.getWrap(Texture::WRAP_T)) << endl;
|
||||
fw.indent() << "wrap_r " << Texture_getWrapStr(texture.getWrap(Texture::WRAP_R)) << endl;
|
||||
fw.indent() << "wrap_s " << Texture_getWrapStr(texture.getWrap(Texture::WRAP_S)) << std::endl;
|
||||
fw.indent() << "wrap_t " << Texture_getWrapStr(texture.getWrap(Texture::WRAP_T)) << std::endl;
|
||||
fw.indent() << "wrap_r " << Texture_getWrapStr(texture.getWrap(Texture::WRAP_R)) << std::endl;
|
||||
|
||||
fw.indent() << "min_filter " << Texture_getFilterStr(texture.getFilter(Texture::MIN_FILTER)) << endl;
|
||||
fw.indent() << "mag_filter " << Texture_getFilterStr(texture.getFilter(Texture::MAG_FILTER)) << endl;
|
||||
fw.indent() << "min_filter " << Texture_getFilterStr(texture.getFilter(Texture::MIN_FILTER)) << std::endl;
|
||||
fw.indent() << "mag_filter " << Texture_getFilterStr(texture.getFilter(Texture::MAG_FILTER)) << std::endl;
|
||||
|
||||
fw.indent() << "internalFormatMode " << Texture_getInternalFormatModeStr(texture.getInternalFormatMode()) << endl;
|
||||
fw.indent() << "internalFormatMode " << Texture_getInternalFormatModeStr(texture.getInternalFormatMode()) << std::endl;
|
||||
|
||||
if (texture.getInternalFormatMode()==Texture::USE_USER_DEFINED_FORMAT)
|
||||
{
|
||||
const char* str = Texture_getInternalFormatValueStr(texture.getInternalFormatValue());
|
||||
if (str) fw.indent() << "internalFormatValue " << str << endl;
|
||||
else fw.indent() << "internalFormatValue " << texture.getInternalFormatValue() << endl;
|
||||
if (str) fw.indent() << "internalFormatValue " << str << std::endl;
|
||||
else fw.indent() << "internalFormatValue " << texture.getInternalFormatValue() << std::endl;
|
||||
}
|
||||
|
||||
fw.indent() << "subloadMode " << Texture_getSubloadModeStr(texture.getSubloadMode()) << endl;
|
||||
fw.indent() << "subloadMode " << Texture_getSubloadModeStr(texture.getSubloadMode()) << std::endl;
|
||||
if (texture.getSubloadMode()!=Texture::OFF)
|
||||
{
|
||||
int x, y;
|
||||
texture.getSubloadOffset(x, y);
|
||||
fw.indent() << "subloadOffset " << x << " " << y << endl;
|
||||
fw.indent() << "subloadOffset " << x << " " << y << std::endl;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -53,8 +53,8 @@ bool Transparency_writeLocalData(const Object& obj, Output& fw)
|
||||
{
|
||||
const Transparency& transparency = static_cast<const Transparency&>(obj);
|
||||
|
||||
fw.indent() << "source " << Transparency_getModeStr(transparency.getSource()) << endl;
|
||||
fw.indent() << "destination " << Transparency_getModeStr(transparency.getDestination()) << endl;
|
||||
fw.indent() << "source " << Transparency_getModeStr(transparency.getSource()) << std::endl;
|
||||
fw.indent() << "destination " << Transparency_getModeStr(transparency.getDestination()) << std::endl;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ static rawImageRec *RawImageOpen(const char *fileName)
|
||||
raw = (rawImageRec *)malloc(sizeof(rawImageRec));
|
||||
if (raw == NULL)
|
||||
{
|
||||
notify(WARN)<< "Out of memory!"<<endl;
|
||||
notify(WARN)<< "Out of memory!"<< std::endl;
|
||||
return NULL;
|
||||
}
|
||||
if ((raw->file = fopen(fileName, "rb")) == NULL)
|
||||
@@ -114,7 +114,7 @@ static rawImageRec *RawImageOpen(const char *fileName)
|
||||
raw->tmp = (unsigned char *)malloc(raw->sizeX*256);
|
||||
if (raw->tmp == NULL )
|
||||
{
|
||||
notify(FATAL)<< "Out of memory!"<<endl;
|
||||
notify(FATAL)<< "Out of memory!"<< std::endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ static rawImageRec *RawImageOpen(const char *fileName)
|
||||
{
|
||||
if( (raw->tmpR = (unsigned char *)malloc(raw->sizeX)) == NULL )
|
||||
{
|
||||
notify(FATAL)<< "Out of memory!"<<endl;
|
||||
notify(FATAL)<< "Out of memory!"<< std::endl;
|
||||
free( raw->tmp );
|
||||
return NULL;
|
||||
}
|
||||
@@ -131,7 +131,7 @@ static rawImageRec *RawImageOpen(const char *fileName)
|
||||
{
|
||||
if( (raw->tmpG = (unsigned char *)malloc(raw->sizeX)) == NULL )
|
||||
{
|
||||
notify(FATAL)<< "Out of memory!"<<endl;
|
||||
notify(FATAL)<< "Out of memory!"<< std::endl;
|
||||
free( raw->tmp );
|
||||
free( raw->tmpR );
|
||||
return NULL;
|
||||
@@ -141,7 +141,7 @@ static rawImageRec *RawImageOpen(const char *fileName)
|
||||
{
|
||||
if( (raw->tmpB = (unsigned char *)malloc(raw->sizeX)) == NULL )
|
||||
{
|
||||
notify(FATAL)<< "Out of memory!"<<endl;
|
||||
notify(FATAL)<< "Out of memory!"<< std::endl;
|
||||
free( raw->tmp );
|
||||
free( raw->tmpR );
|
||||
free( raw->tmpG );
|
||||
@@ -152,7 +152,7 @@ static rawImageRec *RawImageOpen(const char *fileName)
|
||||
{
|
||||
if( (raw->tmpA = (unsigned char *)malloc(raw->sizeX)) == NULL )
|
||||
{
|
||||
notify(FATAL)<< "Out of memory!"<<endl;
|
||||
notify(FATAL)<< "Out of memory!"<< std::endl;
|
||||
free( raw->tmp );
|
||||
free( raw->tmpR );
|
||||
free( raw->tmpG );
|
||||
@@ -168,7 +168,7 @@ static rawImageRec *RawImageOpen(const char *fileName)
|
||||
raw->rowSize = (GLint *)malloc(x);
|
||||
if (raw->rowStart == NULL || raw->rowSize == NULL)
|
||||
{
|
||||
notify(FATAL)<< "Out of memory!"<<endl;
|
||||
notify(FATAL)<< "Out of memory!"<< std::endl;
|
||||
return NULL;
|
||||
}
|
||||
raw->rleEnd = 512 + (2 * x);
|
||||
@@ -346,7 +346,7 @@ class ReaderWriterRGB : public osgDB::ReaderWriter
|
||||
dataType,
|
||||
data);
|
||||
|
||||
notify(INFO) << "image read ok "<<s<<" "<<t<<endl;
|
||||
notify(INFO) << "image read ok "<<s<<" "<<t<< std::endl;
|
||||
return image;
|
||||
|
||||
}
|
||||
|
||||
@@ -43,13 +43,13 @@ class PrintVisitor : public NodeVisitor
|
||||
inline void moveOut() { _indent -= _step; }
|
||||
inline void writeIndent()
|
||||
{
|
||||
for(int i=0;i<_indent;++i) cout << " ";
|
||||
for(int i=0;i<_indent;++i) std::cout << " ";
|
||||
}
|
||||
|
||||
virtual void apply(Node& node)
|
||||
{
|
||||
moveIn();
|
||||
writeIndent(); cout << node.className() <<endl;
|
||||
writeIndent(); std::cout << node.className() <<std::endl;
|
||||
traverse(node);
|
||||
moveOut();
|
||||
}
|
||||
@@ -280,7 +280,7 @@ void CullVisitor::updateCalculatedNearFar(const osg::BoundingBox& bb)
|
||||
|
||||
if (!bb.isValid())
|
||||
{
|
||||
osg::notify(osg::WARN)<<"Warning: CullVisitor::updateCalculatedNearFar(..) passed a null bounding box."<<endl;
|
||||
osg::notify(osg::WARN)<<"Warning: CullVisitor::updateCalculatedNearFar(..) passed a null bounding box."<< std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -314,8 +314,8 @@ void CullVisitor::updateCalculatedNearFar(const osg::BoundingBox& bb)
|
||||
{
|
||||
if ( !EQUAL_F(d_near, d_far) )
|
||||
{
|
||||
osg::notify(osg::WARN)<<"Warning: CullVisitor::updateCalculatedNearFar(.) near>far in range calculation,"<<endl;
|
||||
osg::notify(osg::WARN)<<" correcting by swapping values d_near="<<d_near<<" dfar="<<d_far<<endl;
|
||||
osg::notify(osg::WARN)<<"Warning: CullVisitor::updateCalculatedNearFar(.) near>far in range calculation,"<< std::endl;
|
||||
osg::notify(osg::WARN)<<" correcting by swapping values d_near="<<d_near<<" dfar="<<d_far<< std::endl;
|
||||
}
|
||||
// note, need to reverse the d_near/d_far association because they are
|
||||
// the wrong way around...
|
||||
@@ -429,9 +429,9 @@ void CullVisitor::apply(Geode& node)
|
||||
|
||||
if (g_debugging2)
|
||||
{
|
||||
notify(INFO) << "center ["<<center.x()<<","<<center.y()<<","<<center.z()<<"]"<<endl;
|
||||
notify(INFO) << "delta_center ["<<delta_center.x()<<","<<delta_center.y()<<","<<delta_center.z()<<"]"<<endl;
|
||||
notify(INFO) << "_lookVector ["<<_tvs->_lookVector.x()<<","<<_tvs->_lookVector.y()<<","<<_tvs->_lookVector.z()<<"]"<<endl;
|
||||
notify(INFO) << "center ["<<center.x()<<","<<center.y()<<","<<center.z()<<"]"<< std::endl;
|
||||
notify(INFO) << "delta_center ["<<delta_center.x()<<","<<delta_center.y()<<","<<delta_center.z()<<"]"<< std::endl;
|
||||
notify(INFO) << "_lookVector ["<<_tvs->_lookVector.x()<<","<<_tvs->_lookVector.y()<<","<<_tvs->_lookVector.z()<<"]"<< std::endl;
|
||||
}
|
||||
|
||||
float depth;
|
||||
@@ -515,9 +515,9 @@ void CullVisitor::apply(Billboard& node)
|
||||
|
||||
if (g_debugging2)
|
||||
{
|
||||
notify(INFO) << "center ["<<center.x()<<","<<center.y()<<","<<center.z()<<"]"<<endl;
|
||||
notify(INFO) << "delta_center ["<<delta_center.x()<<","<<delta_center.y()<<","<<delta_center.z()<<"]"<<endl;
|
||||
notify(INFO) << "_lookVector ["<<_tvs->_lookVector.x()<<","<<_tvs->_lookVector.y()<<","<<_tvs->_lookVector.z()<<"]"<<endl;
|
||||
notify(INFO) << "center ["<<center.x()<<","<<center.y()<<","<<center.z()<<"]"<< std::endl;
|
||||
notify(INFO) << "delta_center ["<<delta_center.x()<<","<<delta_center.y()<<","<<delta_center.z()<<"]"<< std::endl;
|
||||
notify(INFO) << "_lookVector ["<<_tvs->_lookVector.x()<<","<<_tvs->_lookVector.y()<<","<<_tvs->_lookVector.z()<<"]"<< std::endl;
|
||||
}
|
||||
|
||||
float depth;
|
||||
@@ -647,7 +647,7 @@ void CullVisitor::apply(LOD& node)
|
||||
StateSet* node_state = node.getStateSet();
|
||||
if (node_state) pushStateSet(node_state);
|
||||
|
||||
//notify(INFO) << "selecting child "<<eval<<endl;
|
||||
//notify(INFO) << "selecting child "<<eval<< std::endl;
|
||||
node.getChild(eval)->accept(*this);
|
||||
|
||||
// pop the node's state off the render graph stack.
|
||||
@@ -775,9 +775,9 @@ void CullVisitor::apply(Impostor& node)
|
||||
|
||||
if (g_debugging2)
|
||||
{
|
||||
notify(INFO) << "center ["<<center.x()<<","<<center.y()<<","<<center.z()<<"]"<<endl;
|
||||
notify(INFO) << "delta_center ["<<delta_center.x()<<","<<delta_center.y()<<","<<delta_center.z()<<"]"<<endl;
|
||||
notify(INFO) << "_lookVector ["<<_tvs->_lookVector.x()<<","<<_tvs->_lookVector.y()<<","<<_tvs->_lookVector.z()<<"]"<<endl;
|
||||
notify(INFO) << "center ["<<center.x()<<","<<center.y()<<","<<center.z()<<"]"<< std::endl;
|
||||
notify(INFO) << "delta_center ["<<delta_center.x()<<","<<delta_center.y()<<","<<delta_center.z()<<"]"<< std::endl;
|
||||
notify(INFO) << "_lookVector ["<<_tvs->_lookVector.x()<<","<<_tvs->_lookVector.y()<<","<<_tvs->_lookVector.z()<<"]"<< std::endl;
|
||||
}
|
||||
|
||||
float depth;
|
||||
@@ -896,6 +896,7 @@ ImpostorSprite* CullVisitor::createImpostorSprite(Impostor& node)
|
||||
_tvs = new CullViewState;
|
||||
|
||||
// store the previous camera setting
|
||||
|
||||
ref_ptr<const Camera> previous_camera = _camera;
|
||||
|
||||
// sets up the _tvs to reflect the new camera.
|
||||
@@ -967,7 +968,7 @@ ImpostorSprite* CullVisitor::createImpostorSprite(Impostor& node)
|
||||
|
||||
if (local_znear>local_zfar)
|
||||
{
|
||||
notify(WARN) << "Warning : problem with osg::CullVisitor::creatImpostorSprite() local_znear ("<<local_znear<<") "<<" > ("<<local_zfar<<") local_zfar"<<endl;
|
||||
notify(WARN) << "Warning : problem with osg::CullVisitor::creatImpostorSprite() local_znear ("<<local_znear<<") "<<" > ("<<local_zfar<<") local_zfar"<< std::endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ void DriveManipulator::home(const GUIEventAdapter& ea,GUIActionAdapter& us)
|
||||
osgUtil::IntersectVisitor::HitList& hitList = iv.getHitList(segDown.get());
|
||||
if (!hitList.empty())
|
||||
{
|
||||
// notify(INFO) << "Hit terrain ok"<<endl;
|
||||
// notify(INFO) << "Hit terrain ok"<< std::endl;
|
||||
osg::Vec3 ip = hitList.front()._intersectPoint;
|
||||
osg::Vec3 np = hitList.front()._intersectNormal;
|
||||
|
||||
@@ -110,7 +110,7 @@ void DriveManipulator::home(const GUIEventAdapter& ea,GUIActionAdapter& us)
|
||||
osgUtil::IntersectVisitor::HitList& hitList = iv.getHitList(segUp.get());
|
||||
if (!hitList.empty())
|
||||
{
|
||||
// notify(INFO) << "Hit terrain ok"<<endl;
|
||||
// notify(INFO) << "Hit terrain ok"<< std::endl;
|
||||
osg::Vec3 ip = hitList.front()._intersectPoint;
|
||||
osg::Vec3 np = hitList.front()._intersectNormal;
|
||||
|
||||
@@ -186,7 +186,7 @@ void DriveManipulator::init(const GUIEventAdapter& ea,GUIActionAdapter& us)
|
||||
osgUtil::IntersectVisitor::HitList& hitList = iv.getHitList(segDown.get());
|
||||
if (!hitList.empty())
|
||||
{
|
||||
// notify(INFO) << "Hit terrain ok"<<endl;
|
||||
// notify(INFO) << "Hit terrain ok"<< std::endl;
|
||||
osg::Vec3 ip = hitList.front()._intersectPoint;
|
||||
osg::Vec3 np = hitList.front()._intersectNormal;
|
||||
|
||||
@@ -225,7 +225,7 @@ void DriveManipulator::init(const GUIEventAdapter& ea,GUIActionAdapter& us)
|
||||
osgUtil::IntersectVisitor::HitList& hitList = iv.getHitList(segUp.get());
|
||||
if (!hitList.empty())
|
||||
{
|
||||
// notify(INFO) << "Hit terrain ok"<<endl;
|
||||
// notify(INFO) << "Hit terrain ok"<< std::endl;
|
||||
osg::Vec3 ip = hitList.front()._intersectPoint;
|
||||
osg::Vec3 np = hitList.front()._intersectNormal;
|
||||
|
||||
@@ -357,7 +357,7 @@ bool DriveManipulator::calcMovement()
|
||||
|
||||
if (dt<0.0f)
|
||||
{
|
||||
notify(WARN) << "warning dt = "<<dt<<endl;
|
||||
notify(WARN) << "warning dt = "<<dt<< std::endl;
|
||||
dt = 0.0f;
|
||||
}
|
||||
|
||||
@@ -446,7 +446,7 @@ bool DriveManipulator::calcMovement()
|
||||
osgUtil::IntersectVisitor::HitList& hitList = iv.getHitList(segForward.get());
|
||||
if (!hitList.empty())
|
||||
{
|
||||
// notify(INFO) << "Hit obstruction"<<endl;
|
||||
// notify(INFO) << "Hit obstruction"<< std::endl;
|
||||
osg::Vec3 ip = hitList.front()._intersectPoint;
|
||||
distanceToMove = (ip-ep).length()-_buffer;
|
||||
_velocity = 0.0f;
|
||||
@@ -471,7 +471,7 @@ bool DriveManipulator::calcMovement()
|
||||
osgUtil::IntersectVisitor::HitList& hitList = iv.getHitList(segNormal.get());
|
||||
if (!hitList.empty())
|
||||
{
|
||||
// notify(INFO) << "Hit terrain ok"<<endl;
|
||||
// notify(INFO) << "Hit terrain ok"<< std::endl;
|
||||
osg::Vec3 ip = hitList.front()._intersectPoint;
|
||||
osg::Vec3 np = hitList.front()._intersectNormal;
|
||||
|
||||
@@ -510,7 +510,7 @@ bool DriveManipulator::calcMovement()
|
||||
if (!hitList.empty())
|
||||
{
|
||||
|
||||
notify(INFO) << "Hit terrain on decent ok"<<endl;
|
||||
notify(INFO) << "Hit terrain on decent ok"<< std::endl;
|
||||
osg::Vec3 ip = hitList.front()._intersectPoint;
|
||||
osg::Vec3 np = hitList.front()._intersectNormal;
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ bool FlightManipulator::calcMovement()
|
||||
|
||||
if (dt<0.0f)
|
||||
{
|
||||
notify(WARN) << "warning dt = "<<dt<<endl;
|
||||
notify(WARN) << "warning dt = "<<dt<< std::endl;
|
||||
dt = 0.0f;
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ bool IntersectState::isCulled(const BoundingSphere& bs,LineSegmentmentMask& segM
|
||||
}
|
||||
mask = mask << 1;
|
||||
}
|
||||
// notify(INFO) << << "mask = "<<segMaskOut<<endl;
|
||||
// notify(INFO) << << "mask = "<<segMaskOut<< std::endl;
|
||||
return !hit;
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ void IntersectVisitor::addLineSegment(LineSegment* seg)
|
||||
|
||||
if (!seg->valid())
|
||||
{
|
||||
notify(WARN)<<"Warning: invalid line segment passed to IntersectVisitor::addLineSegment(..), segment ignored.."<<endl;
|
||||
notify(WARN)<<"Warning: invalid line segment passed to IntersectVisitor::addLineSegment(..), segment ignored.."<< std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@ void IntersectVisitor::pushMatrix(const Matrix& matrix)
|
||||
|
||||
_intersectStateStack.push_back(nis);
|
||||
|
||||
// notify(INFO) << << "IntersectVisitor::pushMatrix()"<<endl;
|
||||
// notify(INFO) << << "IntersectVisitor::pushMatrix()"<< std::endl;
|
||||
}
|
||||
|
||||
|
||||
@@ -293,7 +293,7 @@ void IntersectVisitor::popMatrix()
|
||||
// pvs->unref();
|
||||
_intersectStateStack.pop_back();
|
||||
}
|
||||
// notify(INFO) << << "IntersectVisitor::popMatrix()"<<endl;
|
||||
// notify(INFO) << << "IntersectVisitor::popMatrix()"<< std::endl;
|
||||
}
|
||||
|
||||
|
||||
@@ -511,7 +511,7 @@ bool IntersectVisitor::intersect(GeoSet& gset)
|
||||
}
|
||||
}
|
||||
}
|
||||
// else notify(INFO) << << "no BB hit"<<endl;
|
||||
// else notify(INFO) << << "no BB hit"<< std::endl;
|
||||
}
|
||||
|
||||
return hitFlag;
|
||||
|
||||
@@ -192,7 +192,7 @@ void NvStripifier::BuildStripifyInfo(NvFaceInfoVec &faceInfos, NvEdgeInfoVec &ed
|
||||
else
|
||||
{
|
||||
if (edgeInfo01->m_face1 != NULL)
|
||||
osg::notify(osg::WARN)<<"BuildStripifyInfo: > 2 triangles on an edge... uncertain consequences\n"<<endl;
|
||||
osg::notify(osg::WARN)<<"BuildStripifyInfo: > 2 triangles on an edge... uncertain consequences\n"<< std::endl;
|
||||
else
|
||||
edgeInfo01->m_face1 = faceInfo;
|
||||
}
|
||||
@@ -217,7 +217,7 @@ void NvStripifier::BuildStripifyInfo(NvFaceInfoVec &faceInfos, NvEdgeInfoVec &ed
|
||||
else
|
||||
{
|
||||
if (edgeInfo12->m_face1 != NULL)
|
||||
osg::notify(osg::WARN)<<"BuildStripifyInfo: > 2 triangles on an edge... uncertain consequences\n"<<endl;
|
||||
osg::notify(osg::WARN)<<"BuildStripifyInfo: > 2 triangles on an edge... uncertain consequences\n"<< std::endl;
|
||||
else
|
||||
edgeInfo12->m_face1 = faceInfo;
|
||||
}
|
||||
@@ -242,7 +242,7 @@ void NvStripifier::BuildStripifyInfo(NvFaceInfoVec &faceInfos, NvEdgeInfoVec &ed
|
||||
else
|
||||
{
|
||||
if (edgeInfo20->m_face1 != NULL)
|
||||
osg::notify(osg::WARN)<<"BuildStripifyInfo: > 2 triangles on an edge... uncertain consequences\n"<<endl;
|
||||
osg::notify(osg::WARN)<<"BuildStripifyInfo: > 2 triangles on an edge... uncertain consequences\n"<< std::endl;
|
||||
else
|
||||
edgeInfo20->m_face1 = faceInfo;
|
||||
}
|
||||
@@ -418,8 +418,8 @@ inline int NvStripifier::GetNextIndex(const WordVec &indices, NvFaceInfo *face)
|
||||
{
|
||||
if ((fv1 != v0 && fv1 != v1) || (fv2 != v0 && fv2 != v1))
|
||||
{
|
||||
osg::notify(osg::WARN)<<"GetNextIndex: Triangle doesn't have all of its vertices\n"<<endl;
|
||||
osg::notify(osg::WARN)<<"GetNextIndex: Duplicate triangle probably got us derailed\n"<<endl;
|
||||
osg::notify(osg::WARN)<<"GetNextIndex: Triangle doesn't have all of its vertices\n"<< std::endl;
|
||||
osg::notify(osg::WARN)<<"GetNextIndex: Duplicate triangle probably got us derailed\n"<< std::endl;
|
||||
}
|
||||
return fv0;
|
||||
}
|
||||
@@ -427,8 +427,8 @@ inline int NvStripifier::GetNextIndex(const WordVec &indices, NvFaceInfo *face)
|
||||
{
|
||||
if ((fv0 != v0 && fv0 != v1) || (fv2 != v0 && fv2 != v1))
|
||||
{
|
||||
osg::notify(osg::WARN)<<"GetNextIndex: Triangle doesn't have all of its vertices\n"<<endl;
|
||||
osg::notify(osg::WARN)<<"GetNextIndex: Duplicate triangle probably got us derailed\n"<<endl;
|
||||
osg::notify(osg::WARN)<<"GetNextIndex: Triangle doesn't have all of its vertices\n"<< std::endl;
|
||||
osg::notify(osg::WARN)<<"GetNextIndex: Duplicate triangle probably got us derailed\n"<< std::endl;
|
||||
}
|
||||
return fv1;
|
||||
}
|
||||
@@ -436,14 +436,14 @@ inline int NvStripifier::GetNextIndex(const WordVec &indices, NvFaceInfo *face)
|
||||
{
|
||||
if ((fv0 != v0 && fv0 != v1) || (fv1 != v0 && fv1 != v1))
|
||||
{
|
||||
osg::notify(osg::WARN)<<"GetNextIndex: Triangle doesn't have all of its vertices\n"<<endl;
|
||||
osg::notify(osg::WARN)<<"GetNextIndex: Duplicate triangle probably got us derailed\n"<<endl;
|
||||
osg::notify(osg::WARN)<<"GetNextIndex: Triangle doesn't have all of its vertices\n"<< std::endl;
|
||||
osg::notify(osg::WARN)<<"GetNextIndex: Duplicate triangle probably got us derailed\n"<< std::endl;
|
||||
}
|
||||
return fv2;
|
||||
}
|
||||
|
||||
// shouldn't get here
|
||||
osg::notify(osg::WARN)<<"GetNextIndex: Duplicate triangle sent\n"<<endl;
|
||||
osg::notify(osg::WARN)<<"GetNextIndex: Duplicate triangle sent\n"<< std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -706,7 +706,7 @@ void NvStripifier::CommitStrips(NvStripInfoVec &allStrips, const NvStripInfoVec
|
||||
if( (faces[0]->m_v0 == 2302) &&
|
||||
(faces[0]->m_v1 == 3215) &&
|
||||
(faces[0]->m_v2 == 2603) )
|
||||
osg::notify(osg::WARN)<<"BLEH"<<endl;
|
||||
osg::notify(osg::WARN)<<"BLEH"<< std::endl;
|
||||
|
||||
for (int j = 0; j < numFaces; j++)
|
||||
{
|
||||
|
||||
@@ -149,7 +149,7 @@ void Optimizer::StateVisitor::apply(osg::Geode& geode)
|
||||
|
||||
void Optimizer::StateVisitor::optimize()
|
||||
{
|
||||
osg::notify(osg::INFO) << "Num of StateSet="<<_statesets.size()<<endl;
|
||||
osg::notify(osg::INFO) << "Num of StateSet="<<_statesets.size()<< std::endl;
|
||||
|
||||
|
||||
{
|
||||
@@ -176,7 +176,7 @@ void Optimizer::StateVisitor::optimize()
|
||||
|
||||
if (_attributeToStateSetMap.size()<2)
|
||||
{
|
||||
osg::notify(osg::INFO) << "Too few state attributes to optimize."<<endl;
|
||||
osg::notify(osg::INFO) << "Too few state attributes to optimize."<< std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -196,15 +196,15 @@ void Optimizer::StateVisitor::optimize()
|
||||
std::sort(_attributeList.begin(),_attributeList.end(),LessAttributeFunctor());
|
||||
|
||||
|
||||
osg::notify(osg::INFO) << "state attribute list"<<endl;
|
||||
osg::notify(osg::INFO) << "state attribute list"<< std::endl;
|
||||
for(AttributeList::iterator aaitr = _attributeList.begin();
|
||||
aaitr!=_attributeList.end();
|
||||
++aaitr)
|
||||
{
|
||||
osg::notify(osg::INFO) << " "<<*aaitr << " "<<(*aaitr)->className()<<endl;
|
||||
osg::notify(osg::INFO) << " "<<*aaitr << " "<<(*aaitr)->className()<< std::endl;
|
||||
}
|
||||
|
||||
osg::notify(osg::INFO) << "searching for duplicate attributes"<<endl;
|
||||
osg::notify(osg::INFO) << "searching for duplicate attributes"<< std::endl;
|
||||
// find the duplicates.
|
||||
AttributeList::iterator first_unique = _attributeList.begin();
|
||||
AttributeList::iterator current = first_unique; ++current;
|
||||
@@ -212,13 +212,13 @@ void Optimizer::StateVisitor::optimize()
|
||||
{
|
||||
if (**current==**first_unique)
|
||||
{
|
||||
osg::notify(osg::INFO) << " found duplicate "<<(*current)->className()<<" first="<<*first_unique<<" current="<<*current<<endl;
|
||||
osg::notify(osg::INFO) << " found duplicate "<<(*current)->className()<<" first="<<*first_unique<<" current="<<*current<< std::endl;
|
||||
StateSetList& statesetlist = _attributeToStateSetMap[*current];
|
||||
for(StateSetList::iterator sitr=statesetlist.begin();
|
||||
sitr!=statesetlist.end();
|
||||
++sitr)
|
||||
{
|
||||
osg::notify(osg::INFO) << " replace duplicate "<<*current<<" with "<<*first_unique<< endl;
|
||||
osg::notify(osg::INFO) << " replace duplicate "<<*current<<" with "<<*first_unique<< std::endl;
|
||||
osg::StateSet* stateset = *sitr;
|
||||
stateset->setAttribute(*first_unique);
|
||||
}
|
||||
@@ -246,7 +246,7 @@ void Optimizer::StateVisitor::optimize()
|
||||
// other.
|
||||
std::sort(_statesetSortList.begin(),_statesetSortList.end(),LessStateSetFunctor());
|
||||
|
||||
osg::notify(osg::INFO) << "searching for duplicate attributes"<<endl;
|
||||
osg::notify(osg::INFO) << "searching for duplicate attributes"<< std::endl;
|
||||
// find the duplicates.
|
||||
StateSetSortList::iterator first_unique = _statesetSortList.begin();
|
||||
StateSetSortList::iterator current = first_unique; ++current;
|
||||
@@ -254,13 +254,13 @@ void Optimizer::StateVisitor::optimize()
|
||||
{
|
||||
if (**current==**first_unique)
|
||||
{
|
||||
osg::notify(osg::INFO) << " found duplicate "<<(*current)->className()<<" first="<<*first_unique<<" current="<<*current<<endl;
|
||||
osg::notify(osg::INFO) << " found duplicate "<<(*current)->className()<<" first="<<*first_unique<<" current="<<*current<< std::endl;
|
||||
ObjectSet& objSet = _statesets[*current];
|
||||
for(ObjectSet::iterator sitr=objSet.begin();
|
||||
sitr!=objSet.end();
|
||||
++sitr)
|
||||
{
|
||||
osg::notify(osg::INFO) << " replace duplicate "<<*current<<" with "<<*first_unique<< endl;
|
||||
osg::notify(osg::INFO) << " replace duplicate "<<*current<<" with "<<*first_unique<< std::endl;
|
||||
osg::Object* obj = *sitr;
|
||||
osg::Drawable* drawable = dynamic_cast<osg::Drawable*>(obj);
|
||||
if (drawable)
|
||||
|
||||
@@ -48,7 +48,7 @@ void RenderStage::draw(osg::State& state,RenderLeaf*& previous)
|
||||
|
||||
if (!_viewport)
|
||||
{
|
||||
notify(FATAL) << "Error: cannot drawm stage due to undefined viewport."<<endl;
|
||||
notify(FATAL) << "Error: cannot drawm stage due to undefined viewport."<< std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -272,8 +272,8 @@ void SceneView::draw()
|
||||
|
||||
if (!_state)
|
||||
{
|
||||
osg::notify(osg::WARN) << "Warning: no valid osgUtil::SceneView::_state"<<endl;
|
||||
osg::notify(osg::WARN) << " creating a state automatically."<<endl;
|
||||
osg::notify(osg::WARN) << "Warning: no valid osgUtil::SceneView::_state"<< std::endl;
|
||||
osg::notify(osg::WARN) << " creating a state automatically."<< std::endl;
|
||||
|
||||
// note the constructor for osg::State will set ContextID to 0.
|
||||
_state = new osg::State;
|
||||
@@ -346,7 +346,7 @@ void SceneView::draw()
|
||||
break;
|
||||
default:
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"Warning: stereo camera mode not implemented yet."<<endl;
|
||||
osg::notify(osg::NOTICE)<<"Warning: stereo camera mode not implemented yet."<< std::endl;
|
||||
_renderStage->draw(*_state,previous);
|
||||
}
|
||||
break;
|
||||
@@ -355,7 +355,7 @@ void SceneView::draw()
|
||||
GLenum errorNo = glGetError();
|
||||
if (errorNo!=GL_NO_ERROR)
|
||||
{
|
||||
osg::notify(WARN)<<"Warning: detected OpenGL error '"<<gluErrorString(errorNo)<<"'"<<endl;
|
||||
osg::notify(WARN)<<"Warning: detected OpenGL error '"<<gluErrorString(errorNo)<<"'"<< std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -150,8 +150,8 @@ void Tesselator::do_it()
|
||||
if (_errorCode!=0)
|
||||
{
|
||||
const GLubyte *estring = gluErrorString((GLenum)_errorCode);
|
||||
osg::notify(osg::WARN)<<"Tessellation Error: "<<estring<<endl;
|
||||
osg::notify(osg::WARN)<<" Num indices created = "<<_tesselated_indices.size()<<endl;
|
||||
osg::notify(osg::WARN)<<"Tessellation Error: "<<estring<< std::endl;
|
||||
osg::notify(osg::WARN)<<" Num indices created = "<<_tesselated_indices.size()<< std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,8 +189,8 @@ void Tesselator::do_it()
|
||||
if (_errorCode!=0)
|
||||
{
|
||||
const GLubyte *estring = gluErrorString((GLenum)_errorCode);
|
||||
osg::notify(osg::WARN)<<"Tessellation Error: "<<estring<<endl;
|
||||
osg::notify(osg::WARN)<<" Num indices created = "<<_tesselated_indices.size()<<endl;
|
||||
osg::notify(osg::WARN)<<"Tessellation Error: "<<estring<< std::endl;
|
||||
osg::notify(osg::WARN)<<" Num indices created = "<<_tesselated_indices.size()<< std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -294,7 +294,7 @@ void TriStripVisitor::stripify(GeoSet& gset)
|
||||
}
|
||||
else
|
||||
{
|
||||
notify(INFO) << "No triangles to stripify"<<endl;
|
||||
notify(INFO) << "No triangles to stripify"<< std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user