Fixes to Windows build in liu of the move to using just std::streams.
This commit is contained in:
@@ -452,8 +452,8 @@ void Camera::attachTransform(const TransformMode mode, Matrix* matrix)
|
||||
break;
|
||||
default:
|
||||
_attachedTransformMode = NO_ATTACHED_TRANSFORM;
|
||||
notify(WARN)<<"Warning: invalid TransformMode pass to osg::Camera::attachTransform(..)"<<endl;
|
||||
notify(WARN)<<" setting Camera to NO_ATTACHED_TRANSFORM."<<endl;
|
||||
notify(WARN)<<"Warning: invalid TransformMode pass to osg::Camera::attachTransform(..)"<<std::endl;
|
||||
notify(WARN)<<" setting Camera to NO_ATTACHED_TRANSFORM."<<std::endl;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ void ClipPlane::setClipPlane(const double* plane)
|
||||
}
|
||||
else
|
||||
{
|
||||
notify(WARN)<<"Warning: ClipPlane::setClipPlane() passed NULL plane array, ignoring operation."<<endl;
|
||||
notify(WARN)<<"Warning: ClipPlane::setClipPlane() passed NULL plane array, ignoring operation."<<std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ void Drawable::setUseDisplayList(const bool flag)
|
||||
{
|
||||
if (flag)
|
||||
{
|
||||
notify(WARN)<<"Warning: attempt to setUseDisplayList(true) on a drawable with does not support display lists."<<endl;
|
||||
notify(WARN)<<"Warning: attempt to setUseDisplayList(true) on a drawable with does not support display lists."<<std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -38,12 +38,12 @@ const bool osg::isGLExtensionSupported(const char *extension)
|
||||
}
|
||||
if (*startOfWord!=0) s_extensionSet.insert(std::string(startOfWord));
|
||||
|
||||
osg::notify(INFO)<<"OpenGL extensions supported by installed OpenGL drivers are:"<<endl;
|
||||
osg::notify(INFO)<<"OpenGL extensions supported by installed OpenGL drivers are:"<<std::endl;
|
||||
for(ExtensionSet::iterator itr=s_extensionSet.begin();
|
||||
itr!=s_extensionSet.end();
|
||||
++itr)
|
||||
{
|
||||
osg::notify(INFO)<<" "<<*itr<<endl;
|
||||
osg::notify(INFO)<<" "<<*itr<<std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -51,8 +51,8 @@ const bool osg::isGLExtensionSupported(const char *extension)
|
||||
// true if extension found in extensionSet.
|
||||
bool result = s_extensionSet.find(extension)!=s_extensionSet.end();
|
||||
|
||||
if (result) osg::notify(INFO)<<"OpenGL extension '"<<extension<<"' is supported."<<endl;
|
||||
else osg::notify(INFO)<<"OpenGL extension '"<<extension<<"' is not supported."<<endl;
|
||||
if (result) osg::notify(INFO)<<"OpenGL extension '"<<extension<<"' is supported."<<std::endl;
|
||||
else osg::notify(INFO)<<"OpenGL extension '"<<extension<<"' is not supported."<<std::endl;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ void GeoSet::computeNumVerts() const
|
||||
numverts += _primLengths[i];
|
||||
break;
|
||||
default:
|
||||
notify(WARN) << "Not supported primitive "<<(int)_primtype<<endl;
|
||||
notify(WARN) << "Not supported primitive "<<(int)_primtype<<std::endl;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ void Image::scaleImage(const int s,const int t,const int /*r*/)
|
||||
{
|
||||
::free(newData);
|
||||
|
||||
notify(WARN) << "Error Image::scaleImage() do not succeed : errorString = "<<gluErrorString((GLenum)status)<<endl;
|
||||
notify(WARN) << "Error Image::scaleImage() do not succeed : errorString = "<<gluErrorString((GLenum)status)<<std::endl;
|
||||
}
|
||||
|
||||
++_modifiedTag;
|
||||
@@ -128,8 +128,8 @@ void Image::ensureDimensionsArePowerOfTwo()
|
||||
|
||||
if (new_s!=_s || new_t!=_t)
|
||||
{
|
||||
if (!_fileName.empty()) notify(NOTICE) << "Scaling image '"<<_fileName<<"' from ("<<_s<<","<<_t<<") to ("<<new_s<<","<<new_t<<")"<<endl;
|
||||
else notify(NOTICE) << "Scaling image from ("<<_s<<","<<_t<<") to ("<<new_s<<","<<new_t<<")"<<endl;
|
||||
if (!_fileName.empty()) notify(NOTICE) << "Scaling image '"<<_fileName<<"' from ("<<_s<<","<<_t<<") to ("<<new_s<<","<<new_t<<")"<<std::endl;
|
||||
else notify(NOTICE) << "Scaling image from ("<<_s<<","<<_t<<") to ("<<new_s<<","<<new_t<<")"<<std::endl;
|
||||
|
||||
scaleImage(new_s,new_t,_r);
|
||||
}
|
||||
|
||||
@@ -117,11 +117,11 @@ const bool ImpostorSprite::computeBound() const
|
||||
|
||||
if (!_bbox.isValid())
|
||||
{
|
||||
cout << "******* ImpostorSprite::computeBound() problem"<<endl;
|
||||
cout << "******* = "<<_coords[0]<<endl;
|
||||
cout << "******* = "<<_coords[1]<<endl;
|
||||
cout << "******* = "<<_coords[2]<<endl;
|
||||
cout << "******* = "<<_coords[3]<<endl;
|
||||
notify(WARN) << "******* ImpostorSprite::computeBound() problem"<<std::endl;
|
||||
notify(WARN) << "******* = "<<_coords[0]<<std::endl;
|
||||
notify(WARN) << "******* = "<<_coords[1]<<std::endl;
|
||||
notify(WARN) << "******* = "<<_coords[2]<<std::endl;
|
||||
notify(WARN) << "******* = "<<_coords[3]<<std::endl;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -55,7 +55,7 @@ void Material::setAmbient( const Face face, const Vec4& ambient )
|
||||
_ambientBack = _ambientFront;
|
||||
break;
|
||||
default:
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::setAmbient()."<<endl;
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::setAmbient()."<<std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,12 +71,12 @@ const Vec4& Material::getAmbient(const Face face) const
|
||||
case(FRONT_AND_BACK):
|
||||
if (!_ambientFrontAndBack)
|
||||
{
|
||||
notify(NOTICE)<<"Notice: Material::getAmbient(FRONT_AND_BACK) called on material "<<endl;
|
||||
notify(NOTICE)<<" with seperate FRONT and BACK ambient colors."<<endl;
|
||||
notify(NOTICE)<<"Notice: Material::getAmbient(FRONT_AND_BACK) called on material "<< std::endl;
|
||||
notify(NOTICE)<<" with seperate FRONT and BACK ambient colors."<< std::endl;
|
||||
}
|
||||
return _ambientFront;
|
||||
}
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::getAmbient()."<<endl;
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::getAmbient()."<< std::endl;
|
||||
return _ambientFront;
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ void Material::setDiffuse( const Face face, const Vec4& diffuse )
|
||||
_diffuseBack = _diffuseFront;
|
||||
break;
|
||||
default:
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::setDiffuse()."<<endl;
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::setDiffuse()."<< std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -119,12 +119,12 @@ const Vec4& Material::getDiffuse(const Face face) const
|
||||
case(FRONT_AND_BACK):
|
||||
if (!_diffuseFrontAndBack)
|
||||
{
|
||||
notify(NOTICE)<<"Notice: Material::getDiffuse(FRONT_AND_BACK) called on material "<<endl;
|
||||
notify(NOTICE)<<" with seperate FRONT and BACK diffuse colors."<<endl;
|
||||
notify(NOTICE)<<"Notice: Material::getDiffuse(FRONT_AND_BACK) called on material "<< std::endl;
|
||||
notify(NOTICE)<<" with seperate FRONT and BACK diffuse colors."<< std::endl;
|
||||
}
|
||||
return _diffuseFront;
|
||||
}
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::getDiffuse()."<<endl;
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::getDiffuse()."<< std::endl;
|
||||
return _diffuseFront;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ void Material::setSpecular( const Face face, const Vec4& specular )
|
||||
_specularBack = _specularFront;
|
||||
break;
|
||||
default:
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::setSpecular()."<<endl;
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::setSpecular()."<< std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -167,12 +167,12 @@ const Vec4& Material::getSpecular(const Face face) const
|
||||
case(FRONT_AND_BACK):
|
||||
if (!_specularFrontAndBack)
|
||||
{
|
||||
notify(NOTICE)<<"Notice: Material::getSpecular(FRONT_AND_BACK) called on material "<<endl;
|
||||
notify(NOTICE)<<" with seperate FRONT and BACK specular colors."<<endl;
|
||||
notify(NOTICE)<<"Notice: Material::getSpecular(FRONT_AND_BACK) called on material "<< std::endl;
|
||||
notify(NOTICE)<<" with seperate FRONT and BACK specular colors."<< std::endl;
|
||||
}
|
||||
return _specularFront;
|
||||
}
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::getSpecular()."<<endl;
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::getSpecular()."<< std::endl;
|
||||
return _specularFront;
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ void Material::setEmission( const Face face, const Vec4& emission )
|
||||
_emissionBack = _emissionFront;
|
||||
break;
|
||||
default:
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::setEmission()."<<endl;
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::setEmission()."<< std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -215,12 +215,12 @@ const Vec4& Material::getEmission(const Face face) const
|
||||
case(FRONT_AND_BACK):
|
||||
if (!_emissionFrontAndBack)
|
||||
{
|
||||
notify(NOTICE)<<"Notice: Material::getEmission(FRONT_AND_BACK) called on material "<<endl;
|
||||
notify(NOTICE)<<" with seperate FRONT and BACK emission colors."<<endl;
|
||||
notify(NOTICE)<<"Notice: Material::getEmission(FRONT_AND_BACK) called on material "<< std::endl;
|
||||
notify(NOTICE)<<" with seperate FRONT and BACK emission colors."<< std::endl;
|
||||
}
|
||||
return _emissionFront;
|
||||
}
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::getEmission()."<<endl;
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::getEmission()."<< std::endl;
|
||||
return _emissionFront;
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ void Material::setShininess( const Face face, float shininess )
|
||||
_shininessBack = shininess;
|
||||
break;
|
||||
default:
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::setShininess()."<<endl;
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::setShininess()."<< std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -262,12 +262,12 @@ const float Material::getShininess(const Face face) const
|
||||
case(FRONT_AND_BACK):
|
||||
if (!_shininessFrontAndBack)
|
||||
{
|
||||
notify(NOTICE)<<"Notice: Material::getShininess(FRONT_AND_BACK) called on material "<<endl;
|
||||
notify(NOTICE)<<" with seperate FRONT and BACK shininess colors."<<endl;
|
||||
notify(NOTICE)<<"Notice: Material::getShininess(FRONT_AND_BACK) called on material "<< std::endl;
|
||||
notify(NOTICE)<<" with seperate FRONT and BACK shininess colors."<< std::endl;
|
||||
}
|
||||
return _shininessFront;
|
||||
}
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::getShininess()."<<endl;
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::getShininess()."<< std::endl;
|
||||
return _shininessFront;
|
||||
}
|
||||
|
||||
|
||||
@@ -325,7 +325,7 @@ bool Matrix::invert( const Matrix& _m )
|
||||
|
||||
if ( fabs( pivot) <= 1e-20)
|
||||
{
|
||||
notify(WARN) << "*** pivot = %f in mat_inv. ***"<<endl;
|
||||
notify(WARN) << "*** pivot = %f in mat_inv. ***"<<std::endl;
|
||||
//abort( 0);
|
||||
return false;
|
||||
}
|
||||
@@ -409,7 +409,7 @@ bool Matrix::invertAffine( const Matrix& _m )
|
||||
|
||||
if( (det_1 == 0.0) || (fabs(det_1/(pos-neg)) < PRECISION_LIMIT )) {
|
||||
// _m has no inverse
|
||||
notify(WARN) << "Matrix::invert(): Matrix has no inverse." << endl;
|
||||
notify(WARN) << "Matrix::invert(): Matrix has no inverse." << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include <string>
|
||||
|
||||
osg::NotifySeverity osg::g_NotifyLevel = osg::NOTICE;
|
||||
ofstream *osg::g_NotifyNulStream;
|
||||
std::ofstream *osg::g_NotifyNulStream;
|
||||
bool osg::g_NotifyInit = false;
|
||||
|
||||
void osg::setNotifyLevel(osg::NotifySeverity severity)
|
||||
@@ -27,9 +27,9 @@ bool osg::initNotifyLevel()
|
||||
|
||||
// set up global notify null stream for inline notify
|
||||
#ifdef WIN32
|
||||
g_NotifyNulStream = new ofstream ("nul");
|
||||
g_NotifyNulStream = new std::ofstream ("nul");
|
||||
#else
|
||||
g_NotifyNulStream = new ofstream ("/dev/null");
|
||||
g_NotifyNulStream = new std::ofstream ("/dev/null");
|
||||
#endif
|
||||
|
||||
// g_NotifyLevel
|
||||
|
||||
@@ -49,7 +49,7 @@ const PolygonMode::Mode PolygonMode::getMode(const Face face) const
|
||||
case(FRONT_AND_BACK):
|
||||
return _modeFront;
|
||||
}
|
||||
notify(WARN)<<"Warning : invalid Face passed to PolygonMode::getMode(Face face)"<<endl;
|
||||
notify(WARN)<<"Warning : invalid Face passed to PolygonMode::getMode(Face face)"<<std::endl;
|
||||
return _modeFront;
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ void Quat::makeRotate( const Vec3& from, const Vec3& to )
|
||||
// Get the angle of rotation and axis of this Quat object.
|
||||
// Won't give very meaningful results if the Quat is not associated
|
||||
// with a rotation!
|
||||
void Quat::getRot( float& angle, Vec3& vec ) const
|
||||
void Quat::getRotate( float& angle, Vec3& vec ) const
|
||||
{
|
||||
float sinhalfangle = sqrt( _fv[0]*_fv[0] + _fv[1]*_fv[1] + _fv[2]*_fv[2] );
|
||||
/// float coshalfangle = _fv[3];
|
||||
@@ -112,7 +112,7 @@ void Quat::getRot( float& angle, Vec3& vec ) const
|
||||
}
|
||||
|
||||
|
||||
void Quat::getRot( float& angle, float& x, float& y, float& z ) const
|
||||
void Quat::getRotate( float& angle, float& x, float& y, float& z ) const
|
||||
{
|
||||
float sinhalfangle = sqrt( _fv[0]*_fv[0] + _fv[1]*_fv[1] + _fv[2]*_fv[2] );
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ void TexGen::setPlane(const Coord which, const Vec4& plane)
|
||||
case T : _plane_t = plane; break;
|
||||
case R : _plane_r = plane; break;
|
||||
case Q : _plane_q = plane; break;
|
||||
default : notify(WARN)<<"Error: invalid 'which' passed TexGen::setPlane("<<(unsigned int)which<<","<<plane<<")"<<endl; break;
|
||||
default : notify(WARN)<<"Error: invalid 'which' passed TexGen::setPlane("<<(unsigned int)which<<","<<plane<<")"<<std::endl; break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ const Vec4& TexGen::getPlane(const Coord which) const
|
||||
case T : return _plane_t;
|
||||
case R : return _plane_r;
|
||||
case Q : return _plane_q;
|
||||
default : notify(WARN)<<"Error: invalid 'which' passed TexGen::getPlane(which)"<<endl; return _plane_r;
|
||||
default : notify(WARN)<<"Error: invalid 'which' passed TexGen::getPlane(which)"<<std::endl; return _plane_r;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ void Texture::setWrap(const WrapParameter which, const WrapMode wrap)
|
||||
case WRAP_S : _wrap_s = wrap; break;
|
||||
case WRAP_T : _wrap_t = wrap; break;
|
||||
case WRAP_R : _wrap_r = wrap; break;
|
||||
default : notify(WARN)<<"Error: invalid 'which' passed Texture::setWrap("<<(unsigned int)which<<","<<(unsigned int)wrap<<")"<<endl; break;
|
||||
default : notify(WARN)<<"Error: invalid 'which' passed Texture::setWrap("<<(unsigned int)which<<","<<(unsigned int)wrap<<")"<<std::endl; break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ const Texture::WrapMode Texture::getWrap(const WrapParameter which) const
|
||||
case WRAP_S : return _wrap_s;
|
||||
case WRAP_T : return _wrap_t;
|
||||
case WRAP_R : return _wrap_r;
|
||||
default : notify(WARN)<<"Error: invalid 'which' passed Texture::getWrap(which)"<<endl; return _wrap_s;
|
||||
default : notify(WARN)<<"Error: invalid 'which' passed Texture::getWrap(which)"<<std::endl; return _wrap_s;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ void Texture::setFilter(const FilterParameter which, const FilterMode filter)
|
||||
{
|
||||
case MIN_FILTER : _min_filter = filter; break;
|
||||
case MAG_FILTER : _mag_filter = filter; break;
|
||||
default : notify(WARN)<<"Error: invalid 'which' passed Texture::setFilter("<<(unsigned int)which<<","<<(unsigned int)filter<<")"<<endl; break;
|
||||
default : notify(WARN)<<"Error: invalid 'which' passed Texture::setFilter("<<(unsigned int)which<<","<<(unsigned int)filter<<")"<<std::endl; break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ const Texture::FilterMode Texture::getFilter(const FilterParameter which) const
|
||||
{
|
||||
case MIN_FILTER : return _min_filter;
|
||||
case MAG_FILTER : return _mag_filter;
|
||||
default : notify(WARN)<<"Error: invalid 'which' passed Texture::getFilter(which)"<<endl; return _min_filter;
|
||||
default : notify(WARN)<<"Error: invalid 'which' passed Texture::getFilter(which)"<< std::endl; return _min_filter;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -539,7 +539,7 @@ void Texture::copyTexImage2D(State& state, int x, int y, int width, int height )
|
||||
_textureWidth = width;
|
||||
_textureHeight = height;
|
||||
|
||||
// cout<<"copyTexImage2D x="<<x<<" y="<<y<<" w="<<width<<" h="<<height<<endl;
|
||||
// cout<<"copyTexImage2D x="<<x<<" y="<<y<<" w="<<width<<" h="<<height<< std::endl;
|
||||
|
||||
// inform state that this texture is the current one bound.
|
||||
state.have_applied(this);
|
||||
|
||||
Reference in New Issue
Block a user