Convesion of osg::notify to OSG_INFO etc.

This commit is contained in:
Robert Osfield
2010-05-28 15:47:52 +00:00
parent e753be1b20
commit a79a8d30f9
67 changed files with 775 additions and 785 deletions

View File

@@ -32,7 +32,7 @@ void AlphaFunc::apply(State&) const
#ifdef OSG_GL_FIXED_FUNCTION_AVAILABLE
glAlphaFunc((GLenum)_comparisonFunc,_referenceValue);
#else
osg::notify(osg::NOTICE)<<"Warning: AlphaFunc::apply(State&) - not supported."<<std::endl;
OSG_NOTICE<<"Warning: AlphaFunc::apply(State&) - not supported."<<std::endl;
#endif
}

View File

@@ -307,18 +307,18 @@ public:
AttributeDispatch* dispatcher(bool useGLBeginEndAdapter, const Array* array, const IndexArray* indices)
{
// osg::notify(osg::NOTICE)<<"dispatcher("<<useGLBeginEndAdapter<<", "<<array<<", "<<indices<<")"<<std::endl;
// OSG_NOTICE<<"dispatcher("<<useGLBeginEndAdapter<<", "<<array<<", "<<indices<<")"<<std::endl;
if (!array) return 0;
Array::Type type = array->getType();
AttributeDispatch* dispatcher = 0;
// osg::notify(osg::NOTICE)<<" array->getType()="<<type<<std::endl;
// osg::notify(osg::NOTICE)<<" _glBeginEndAttributeDispatchList.size()="<<_glBeginEndAttributeDispatchList.size()<<std::endl;
// osg::notify(osg::NOTICE)<<" _glBeginEndAttributeDispatchWithIndicesList.size()="<<_glBeginEndAttributeDispatchWithIndicesList.size()<<std::endl;
// osg::notify(osg::NOTICE)<<" _attributeDispatchIndicesList.size()="<<_attributeDispatchList.size()<<std::endl;
// osg::notify(osg::NOTICE)<<" _attributeDispatchWithIndicesList.size()="<<_attributeDispatchWithIndicesList.size()<<std::endl;
// OSG_NOTICE<<" array->getType()="<<type<<std::endl;
// OSG_NOTICE<<" _glBeginEndAttributeDispatchList.size()="<<_glBeginEndAttributeDispatchList.size()<<std::endl;
// OSG_NOTICE<<" _glBeginEndAttributeDispatchWithIndicesList.size()="<<_glBeginEndAttributeDispatchWithIndicesList.size()<<std::endl;
// OSG_NOTICE<<" _attributeDispatchIndicesList.size()="<<_attributeDispatchList.size()<<std::endl;
// OSG_NOTICE<<" _attributeDispatchWithIndicesList.size()="<<_attributeDispatchWithIndicesList.size()<<std::endl;
if (useGLBeginEndAdapter)
{
@@ -351,13 +351,13 @@ public:
if (dispatcher)
{
// osg::notify(osg::NOTICE)<<" returning dispatcher="<<dispatcher<<std::endl;
// OSG_NOTICE<<" returning dispatcher="<<dispatcher<<std::endl;
dispatcher->assign(array->getDataPointer(), indices);
return dispatcher;
}
else
{
// osg::notify(osg::NOTICE)<<" no dispatcher found"<<std::endl;
// OSG_NOTICE<<" no dispatcher found"<<std::endl;
return 0;
}
}

View File

@@ -43,7 +43,7 @@ void BlendColor::apply(State& state) const
if (!extensions->isBlendColorSupported())
{
notify(WARN)<<"Warning: BlendColor::apply(..) failed, BlendColor is not support by OpenGL driver."<<std::endl;
OSG_WARN<<"Warning: BlendColor::apply(..) failed, BlendColor is not support by OpenGL driver."<<std::endl;
return;
}
@@ -104,7 +104,7 @@ void BlendColor::Extensions::glBlendColor(GLclampf red , GLclampf green , GLclam
}
else
{
notify(WARN)<<"Error: glBlendColor not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glBlendColor not supported by OpenGL driver"<<std::endl;
}
}

View File

@@ -52,19 +52,19 @@ void BlendEquation::apply(State& state) const
if (!extensions->isBlendEquationSupported())
{
notify(WARN)<<"Warning: BlendEquation::apply(..) failed, BlendEquation is not support by OpenGL driver."<<std::endl;
OSG_WARN<<"Warning: BlendEquation::apply(..) failed, BlendEquation is not support by OpenGL driver."<<std::endl;
return;
}
if((_equationRGB == ALPHA_MIN || _equationRGB == ALPHA_MAX) && !extensions->isSGIXMinMaxSupported())
{
notify(WARN)<<"Warning: BlendEquation::apply(..) failed, SGIX_blend_alpha_minmax extension is not supported by OpenGL driver." << std::endl;
OSG_WARN<<"Warning: BlendEquation::apply(..) failed, SGIX_blend_alpha_minmax extension is not supported by OpenGL driver." << std::endl;
return;
}
if(_equationRGB == LOGIC_OP && !extensions->isLogicOpSupported())
{
notify(WARN)<<"Warning: BlendEquation::apply(..) failed, EXT_blend_logic_op extension is not supported by OpenGL driver." << std::endl;
OSG_WARN<<"Warning: BlendEquation::apply(..) failed, EXT_blend_logic_op extension is not supported by OpenGL driver." << std::endl;
return;
}
@@ -76,7 +76,7 @@ void BlendEquation::apply(State& state) const
extensions->glBlendEquationSeparate(static_cast<GLenum>(_equationRGB), static_cast<GLenum>(_equationAlpha));
else
{
notify(WARN)<<"Warning: BlendEquation::apply(..) failed, EXT_blend_equation_separate extension is not supported by OpenGL driver." << std::endl;
OSG_WARN<<"Warning: BlendEquation::apply(..) failed, EXT_blend_equation_separate extension is not supported by OpenGL driver." << std::endl;
return;
}
}
@@ -148,7 +148,7 @@ void BlendEquation::Extensions::glBlendEquation(GLenum mode) const
}
else
{
notify(WARN)<<"Error: glBlendEquation not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glBlendEquation not supported by OpenGL driver"<<std::endl;
}
}
@@ -160,7 +160,7 @@ void BlendEquation::Extensions::glBlendEquationSeparate(GLenum modeRGB, GLenum m
}
else
{
notify(WARN)<<"Error: glBlendEquationSeparate not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glBlendEquationSeparate not supported by OpenGL driver"<<std::endl;
}
}

View File

@@ -58,7 +58,7 @@ void BlendFunc::apply(State& state) const
if (!extensions->isBlendFuncSeparateSupported())
{
notify(WARN)<<"Warning: BlendFunc::apply(..) failed, BlendFuncSeparate is not support by OpenGL driver, falling back to BlendFunc."<<std::endl;
OSG_WARN<<"Warning: BlendFunc::apply(..) failed, BlendFuncSeparate is not support by OpenGL driver, falling back to BlendFunc."<<std::endl;
}
else
{
@@ -124,6 +124,6 @@ void BlendFunc::Extensions::glBlendFuncSeparate(GLenum sfactorRGB,
}
else
{
notify(WARN)<<"Error: glBlendFuncSeparate not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glBlendFuncSeparate not supported by OpenGL driver"<<std::endl;
}
}

View File

@@ -66,12 +66,12 @@ GLBufferObject::GLBufferObject(unsigned int contextID, BufferObject* bufferObjec
_extensions->glGenBuffers(1, &_glObjectID);
}
// OSG_NOTIFY(osg::NOTICE)<<"Constucting BufferObject "<<this<<std::endl;
// OSG_NOTICE<<"Constucting BufferObject "<<this<<std::endl;
}
GLBufferObject::~GLBufferObject()
{
//OSG_NOTIFY(osg::NOTICE)<<"Destucting BufferObject "<<this<<std::endl;
//OSG_NOTICE<<"Destucting BufferObject "<<this<<std::endl;
}
void GLBufferObject::setBufferObject(BufferObject* bufferObject)
@@ -129,7 +129,7 @@ void GLBufferObject::compileBuffer()
{
unsigned int previousEndOfBufferDataMarker = entry.offset + entry.dataSize;
// OSG_NOTIFY(osg::NOTICE)<<"GLBufferObject::compileBuffer(..) updating BufferEntry"<<std::endl;
// OSG_NOTICE<<"GLBufferObject::compileBuffer(..) updating BufferEntry"<<std::endl;
entry.offset = newTotalSize;
@@ -152,11 +152,11 @@ void GLBufferObject::compileBuffer()
entry.dataSize = bd->getTotalDataSize();
entry.dataSource = bd;
#if 0
OSG_NOTIFY(osg::NOTICE)<<"entry"<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" offset "<<entry.offset<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" dataSize "<<entry.dataSize<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" dataSource "<<entry.dataSource<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" modifiedCount "<<entry.modifiedCount<<std::endl;
OSG_NOTICE<<"entry"<<std::endl;
OSG_NOTICE<<" offset "<<entry.offset<<std::endl;
OSG_NOTICE<<" dataSize "<<entry.dataSize<<std::endl;
OSG_NOTICE<<" dataSource "<<entry.dataSource<<std::endl;
OSG_NOTICE<<" modifiedCount "<<entry.modifiedCount<<std::endl;
#endif
newTotalSize += entry.dataSize;
@@ -175,7 +175,7 @@ void GLBufferObject::compileBuffer()
if (newTotalSize > _profile._size)
{
OSG_NOTIFY(osg::INFO)<<"newTotalSize="<<newTotalSize<<", _profile._size="<<_profile._size<<std::endl;
OSG_INFO<<"newTotalSize="<<newTotalSize<<", _profile._size="<<_profile._size<<std::endl;
_profile._size = newTotalSize;
@@ -205,7 +205,7 @@ void GLBufferObject::compileBuffer()
BufferEntry& entry = *itr;
if (compileAll || entry.modifiedCount != entry.dataSource->getModifiedCount())
{
// OSG_NOTIFY(osg::NOTICE)<<"GLBufferObject::compileBuffer(..) downloading BufferEntry "<<&entry<<std::endl;
// OSG_NOTICE<<"GLBufferObject::compileBuffer(..) downloading BufferEntry "<<&entry<<std::endl;
entry.modifiedCount = entry.dataSource->getModifiedCount();
if (vboMemory)
@@ -224,7 +224,7 @@ void GLBufferObject::compileBuffer()
void GLBufferObject::deleteGLObject()
{
OSG_NOTIFY(osg::INFO)<<"GLBufferObject::deleteGLObject() "<<_glObjectID<<std::endl;
OSG_INFO<<"GLBufferObject::deleteGLObject() "<<_glObjectID<<std::endl;
if (_glObjectID!=0)
{
_extensions->glDeleteBuffers(1, &_glObjectID);
@@ -310,31 +310,31 @@ void GLBufferObject::Extensions::setupGLExtensions(unsigned int contextID)
void GLBufferObject::Extensions::glGenBuffers(GLsizei n, GLuint *buffers) const
{
if (_glGenBuffers) _glGenBuffers(n, buffers);
else notify(WARN)<<"Error: glGenBuffers not supported by OpenGL driver"<<std::endl;
else OSG_WARN<<"Error: glGenBuffers not supported by OpenGL driver"<<std::endl;
}
void GLBufferObject::Extensions::glBindBuffer(GLenum target, GLuint buffer) const
{
if (_glBindBuffer) _glBindBuffer(target, buffer);
else notify(WARN)<<"Error: glBindBuffer not supported by OpenGL driver"<<std::endl;
else OSG_WARN<<"Error: glBindBuffer not supported by OpenGL driver"<<std::endl;
}
void GLBufferObject::Extensions::glBufferData(GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage) const
{
if (_glBufferData) _glBufferData(target, size, data, usage);
else notify(WARN)<<"Error: glBufferData not supported by OpenGL driver"<<std::endl;
else OSG_WARN<<"Error: glBufferData not supported by OpenGL driver"<<std::endl;
}
void GLBufferObject::Extensions::glBufferSubData(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data) const
{
if (_glBufferSubData) _glBufferSubData(target, offset, size, data);
else notify(WARN)<<"Error: glBufferData not supported by OpenGL driver"<<std::endl;
else OSG_WARN<<"Error: glBufferData not supported by OpenGL driver"<<std::endl;
}
void GLBufferObject::Extensions::glDeleteBuffers(GLsizei n, const GLuint *buffers) const
{
if (_glDeleteBuffers) _glDeleteBuffers(n, buffers);
else notify(WARN)<<"Error: glBufferData not supported by OpenGL driver"<<std::endl;
else OSG_WARN<<"Error: glBufferData not supported by OpenGL driver"<<std::endl;
}
GLboolean GLBufferObject::Extensions::glIsBuffer (GLuint buffer) const
@@ -342,7 +342,7 @@ GLboolean GLBufferObject::Extensions::glIsBuffer (GLuint buffer) const
if (_glIsBuffer) return _glIsBuffer(buffer);
else
{
notify(WARN)<<"Error: glIsBuffer not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glIsBuffer not supported by OpenGL driver"<<std::endl;
return GL_FALSE;
}
}
@@ -350,7 +350,7 @@ GLboolean GLBufferObject::Extensions::glIsBuffer (GLuint buffer) const
void GLBufferObject::Extensions::glGetBufferSubData (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data) const
{
if (_glGetBufferSubData) _glGetBufferSubData(target,offset,size,data);
else notify(WARN)<<"Error: glGetBufferSubData not supported by OpenGL driver"<<std::endl;
else OSG_WARN<<"Error: glGetBufferSubData not supported by OpenGL driver"<<std::endl;
}
GLvoid* GLBufferObject::Extensions::glMapBuffer (GLenum target, GLenum access) const
@@ -358,7 +358,7 @@ GLvoid* GLBufferObject::Extensions::glMapBuffer (GLenum target, GLenum access) c
if (_glMapBuffer) return _glMapBuffer(target,access);
else
{
notify(WARN)<<"Error: glMapBuffer not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glMapBuffer not supported by OpenGL driver"<<std::endl;
return 0;
}
}
@@ -368,7 +368,7 @@ GLboolean GLBufferObject::Extensions::glUnmapBuffer (GLenum target) const
if (_glUnmapBuffer) return _glUnmapBuffer(target);
else
{
notify(WARN)<<"Error: glUnmapBuffer not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glUnmapBuffer not supported by OpenGL driver"<<std::endl;
return GL_FALSE;
}
}
@@ -376,13 +376,13 @@ GLboolean GLBufferObject::Extensions::glUnmapBuffer (GLenum target) const
void GLBufferObject::Extensions::glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params) const
{
if (_glGetBufferParameteriv) _glGetBufferParameteriv(target,pname,params);
else notify(WARN)<<"Error: glGetBufferParameteriv not supported by OpenGL driver"<<std::endl;
else OSG_WARN<<"Error: glGetBufferParameteriv not supported by OpenGL driver"<<std::endl;
}
void GLBufferObject::Extensions::glGetBufferPointerv (GLenum target, GLenum pname, GLvoid* *params) const
{
if (_glGetBufferPointerv) _glGetBufferPointerv(target,pname,params);
else notify(WARN)<<"Error: glGetBufferPointerv not supported by OpenGL driver"<<std::endl;
else OSG_WARN<<"Error: glGetBufferPointerv not supported by OpenGL driver"<<std::endl;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -397,16 +397,16 @@ GLBufferObjectSet::GLBufferObjectSet(GLBufferObjectManager* parent, const Buffer
_head(0),
_tail(0)
{
OSG_NOTIFY(osg::INFO)<<"GLBufferObjectSet::GLBufferObjectSet _profile._size="<<_profile._size<<std::endl;
OSG_INFO<<"GLBufferObjectSet::GLBufferObjectSet _profile._size="<<_profile._size<<std::endl;
}
GLBufferObjectSet::~GLBufferObjectSet()
{
#if 0
OSG_NOTIFY(osg::NOTICE)<<"GLBufferObjectSet::~GLBufferObjectSet(), _numOfGLBufferObjects="<<_numOfGLBufferObjects<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" _orphanedGLBufferObjects = "<<_orphanedGLBufferObjects.size()<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" _head = "<<_head<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" _tail = "<<_tail<<std::endl;
OSG_NOTICE<<"GLBufferObjectSet::~GLBufferObjectSet(), _numOfGLBufferObjects="<<_numOfGLBufferObjects<<std::endl;
OSG_NOTICE<<" _orphanedGLBufferObjects = "<<_orphanedGLBufferObjects.size()<<std::endl;
OSG_NOTICE<<" _head = "<<_head<<std::endl;
OSG_NOTICE<<" _tail = "<<_tail<<std::endl;
#endif
}
@@ -415,7 +415,7 @@ bool GLBufferObjectSet::checkConsistency() const
#ifndef CHECK_CONSISTENCY
return true;
#else
// OSG_NOTIFY(osg::NOTICE)<<"GLBufferObjectSet::checkConsistency()"<<std::endl;
// OSG_NOTICE<<"GLBufferObjectSet::checkConsistency()"<<std::endl;
// check consistency of linked list.
unsigned int numInList = 0;
GLBufferObject* to = _head;
@@ -427,7 +427,7 @@ bool GLBufferObjectSet::checkConsistency() const
{
if ((to->_next)->_previous != to)
{
OSG_NOTIFY(osg::NOTICE)<<"GLBufferObjectSet::checkConsistency() : Error (to->_next)->_previous != to "<<std::endl;
OSG_NOTICE<<"GLBufferObjectSet::checkConsistency() : Error (to->_next)->_previous != to "<<std::endl;
return false;
}
}
@@ -435,7 +435,7 @@ bool GLBufferObjectSet::checkConsistency() const
{
if (_tail != to)
{
OSG_NOTIFY(osg::NOTICE)<<"GLBufferObjectSet::checkConsistency() : Error _trail != to"<<std::endl;
OSG_NOTICE<<"GLBufferObjectSet::checkConsistency() : Error _trail != to"<<std::endl;
return false;
}
}
@@ -446,11 +446,11 @@ bool GLBufferObjectSet::checkConsistency() const
unsigned int totalNumber = numInList + _orphanedGLBufferObjects.size();
if (totalNumber != _numOfGLBufferObjects)
{
OSG_NOTIFY(osg::NOTICE)<<"Error numInList + _orphanedGLBufferObjects.size() != _numOfGLBufferObjects"<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" numInList = "<<numInList<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" _orphanedGLBufferObjects.size() = "<<_orphanedGLBufferObjects.size()<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" _pendingOrphanedGLBufferObjects.size() = "<<_pendingOrphanedGLBufferObjects.size()<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" _numOfGLBufferObjects = "<<_numOfGLBufferObjects<<std::endl;
OSG_NOTICE<<"Error numInList + _orphanedGLBufferObjects.size() != _numOfGLBufferObjects"<<std::endl;
OSG_NOTICE<<" numInList = "<<numInList<<std::endl;
OSG_NOTICE<<" _orphanedGLBufferObjects.size() = "<<_orphanedGLBufferObjects.size()<<std::endl;
OSG_NOTICE<<" _pendingOrphanedGLBufferObjects.size() = "<<_pendingOrphanedGLBufferObjects.size()<<std::endl;
OSG_NOTICE<<" _numOfGLBufferObjects = "<<_numOfGLBufferObjects<<std::endl;
return false;
}
@@ -460,7 +460,7 @@ bool GLBufferObjectSet::checkConsistency() const
void GLBufferObjectSet::handlePendingOrphandedGLBufferObjects()
{
// OSG_NOTIFY(osg::NOTICE)<<"handlePendingOrphandedGLBufferObjects()"<<_pendingOrphanedGLBufferObjects.size()<<std::endl;
// OSG_NOTICE<<"handlePendingOrphandedGLBufferObjects()"<<_pendingOrphanedGLBufferObjects.size()<<std::endl;
if (_pendingOrphanedGLBufferObjects.empty()) return;
@@ -477,10 +477,10 @@ void GLBufferObjectSet::handlePendingOrphandedGLBufferObjects()
remove(to);
#if 0
OSG_NOTIFY(osg::NOTICE)<<" HPOTO after _head = "<<_head<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" HPOTO after _tail = "<<_tail<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" HPOTO after to->_previous = "<<to->_previous<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" HPOTO after to->_next = "<<to->_next<<std::endl;
OSG_NOTICE<<" HPOTO after _head = "<<_head<<std::endl;
OSG_NOTICE<<" HPOTO after _tail = "<<_tail<<std::endl;
OSG_NOTICE<<" HPOTO after to->_previous = "<<to->_previous<<std::endl;
OSG_NOTICE<<" HPOTO after to->_next = "<<to->_next<<std::endl;
#endif
}
@@ -497,7 +497,7 @@ void GLBufferObjectSet::handlePendingOrphandedGLBufferObjects()
void GLBufferObjectSet::deleteAllGLBufferObjects()
{
// OSG_NOTIFY(osg::NOTICE)<<"GLBufferObjectSet::deleteAllGLBufferObjects()"<<std::endl;
// OSG_NOTICE<<"GLBufferObjectSet::deleteAllGLBufferObjects()"<<std::endl;
// clean up the pending orphans.
handlePendingOrphandedGLBufferObjects();
@@ -529,12 +529,12 @@ void GLBufferObjectSet::deleteAllGLBufferObjects()
// do the actual delete.
flushAllDeletedGLBufferObjects();
// OSG_NOTIFY(osg::NOTICE)<<"done GLBufferObjectSet::deleteAllGLBufferObjects()"<<std::endl;
// OSG_NOTICE<<"done GLBufferObjectSet::deleteAllGLBufferObjects()"<<std::endl;
}
void GLBufferObjectSet::discardAllGLBufferObjects()
{
// OSG_NOTIFY(osg::NOTICE)<<"GLBufferObjectSet::discardAllGLBufferObjects()"<<std::endl;
// OSG_NOTICE<<"GLBufferObjectSet::discardAllGLBufferObjects()"<<std::endl;
GLBufferObject* to = _head;
while(to!=0)
@@ -589,7 +589,7 @@ void GLBufferObjectSet::flushAllDeletedGLBufferObjects()
void GLBufferObjectSet::discardAllDeletedGLBufferObjects()
{
// OSG_NOTIFY(osg::NOTICE)<<"GLBufferObjectSet::discardAllDeletedGLBufferObjects()"<<std::endl;
// OSG_NOTICE<<"GLBufferObjectSet::discardAllDeletedGLBufferObjects()"<<std::endl;
// clean up the pending orphans.
handlePendingOrphandedGLBufferObjects();
@@ -639,9 +639,9 @@ void GLBufferObjectSet::flushDeletedGLBufferObjects(double currentTime, double&
++numDeleted;
}
// OSG_NOTIFY(osg::NOTICE)<<"Size before = "<<_orphanedGLBufferObjects.size();
// OSG_NOTICE<<"Size before = "<<_orphanedGLBufferObjects.size();
_orphanedGLBufferObjects.erase(_orphanedGLBufferObjects.begin(), itr);
//OSG_NOTIFY(osg::NOTICE)<<", after = "<<_orphanedGLBufferObjects.size()<<" numDeleted = "<<numDeleted<<std::endl;
//OSG_NOTICE<<", after = "<<_orphanedGLBufferObjects.size()<<" numDeleted = "<<numDeleted<<std::endl;
// update the number of TO's in this GLBufferObjectSet
_numOfGLBufferObjects -= numDeleted;
@@ -689,7 +689,7 @@ GLBufferObject* GLBufferObjectSet::takeFromOrphans(BufferObject* bufferObject)
// place at back of active list
addToBack(glbo.get());
// OSG_NOTIFY(osg::NOTICE)<<"Reusing orhpahned GLBufferObject, _numOfGLBufferObjects="<<_numOfGLBufferObjects<<std::endl;
// OSG_NOTICE<<"Reusing orhpahned GLBufferObject, _numOfGLBufferObjects="<<_numOfGLBufferObjects<<std::endl;
return glbo.release();
}
@@ -728,11 +728,11 @@ GLBufferObject* GLBufferObjectSet::takeOrGenerate(BufferObject* bufferObject)
if (original_BufferObject.valid())
{
original_BufferObject->setGLBufferObject(_contextID,0);
// OSG_NOTIFY(osg::NOTICE)<<"GLBufferObjectSet="<<this<<": Reusing an active GLBufferObject "<<glbo.get()<<" _numOfGLBufferObjects="<<_numOfGLBufferObjects<<" size="<<_profile._size<<std::endl;
// OSG_NOTICE<<"GLBufferObjectSet="<<this<<": Reusing an active GLBufferObject "<<glbo.get()<<" _numOfGLBufferObjects="<<_numOfGLBufferObjects<<" size="<<_profile._size<<std::endl;
}
else
{
// OSG_NOTIFY(osg::NOTICE)<<"Reusing a recently orphaned active GLBufferObject "<<glbo.get()<<std::endl;
// OSG_NOTICE<<"Reusing a recently orphaned active GLBufferObject "<<glbo.get()<<std::endl;
}
moveToBack(glbo.get());
@@ -756,7 +756,7 @@ GLBufferObject* GLBufferObjectSet::takeOrGenerate(BufferObject* bufferObject)
addToBack(glbo);
// OSG_NOTIFY(osg::NOTICE)<<"Created new GLBufferObject, _numOfGLBufferObjects "<<_numOfGLBufferObjects<<std::endl;
// OSG_NOTICE<<"Created new GLBufferObject, _numOfGLBufferObjects "<<_numOfGLBufferObjects<<std::endl;
return glbo;
}
@@ -764,11 +764,11 @@ GLBufferObject* GLBufferObjectSet::takeOrGenerate(BufferObject* bufferObject)
void GLBufferObjectSet::moveToBack(GLBufferObject* to)
{
#if 0
OSG_NOTIFY(osg::NOTICE)<<"GLBufferObjectSet::moveToBack("<<to<<")"<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" before _head = "<<_head<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" before _tail = "<<_tail<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" before to->_previous = "<<to->_previous<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" before to->_next = "<<to->_next<<std::endl;
OSG_NOTICE<<"GLBufferObjectSet::moveToBack("<<to<<")"<<std::endl;
OSG_NOTICE<<" before _head = "<<_head<<std::endl;
OSG_NOTICE<<" before _tail = "<<_tail<<std::endl;
OSG_NOTICE<<" before to->_previous = "<<to->_previous<<std::endl;
OSG_NOTICE<<" before to->_next = "<<to->_next<<std::endl;
#endif
to->_frameLastUsed = _parent->getFrameNumber();
@@ -779,7 +779,7 @@ void GLBufferObjectSet::moveToBack(GLBufferObject* to)
// if no tail exists then assign 'to' as tail and head
if (_tail==0)
{
OSG_NOTIFY(osg::NOTICE)<<"Error ***************** Should not get here !!!!!!!!!"<<std::endl;
OSG_NOTICE<<"Error ***************** Should not get here !!!!!!!!!"<<std::endl;
_head = to;
_tail = to;
return;
@@ -787,7 +787,7 @@ void GLBufferObjectSet::moveToBack(GLBufferObject* to)
if (to->_next==0)
{
OSG_NOTIFY(osg::NOTICE)<<"Error ***************** Should not get here either !!!!!!!!!"<<std::endl;
OSG_NOTICE<<"Error ***************** Should not get here either !!!!!!!!!"<<std::endl;
return;
}
@@ -815,10 +815,10 @@ void GLBufferObjectSet::moveToBack(GLBufferObject* to)
_tail = to;
#if 0
OSG_NOTIFY(osg::NOTICE)<<" m2B after _head = "<<_head<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" m2B after _tail = "<<_tail<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" m2B after to->_previous = "<<to->_previous<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" m2B after to->_next = "<<to->_next<<std::endl;
OSG_NOTICE<<" m2B after _head = "<<_head<<std::endl;
OSG_NOTICE<<" m2B after _tail = "<<_tail<<std::endl;
OSG_NOTICE<<" m2B after to->_previous = "<<to->_previous<<std::endl;
OSG_NOTICE<<" m2B after to->_next = "<<to->_next<<std::endl;
#endif
checkConsistency();
}
@@ -826,11 +826,11 @@ void GLBufferObjectSet::moveToBack(GLBufferObject* to)
void GLBufferObjectSet::addToBack(GLBufferObject* to)
{
#if 0
OSG_NOTIFY(osg::NOTICE)<<"GLBufferObjectSet::addToBack("<<to<<")"<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" before _head = "<<_head<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" before _tail = "<<_tail<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" before to->_previous = "<<to->_previous<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" before to->_next = "<<to->_next<<std::endl;
OSG_NOTICE<<"GLBufferObjectSet::addToBack("<<to<<")"<<std::endl;
OSG_NOTICE<<" before _head = "<<_head<<std::endl;
OSG_NOTICE<<" before _tail = "<<_tail<<std::endl;
OSG_NOTICE<<" before to->_previous = "<<to->_previous<<std::endl;
OSG_NOTICE<<" before to->_next = "<<to->_next<<std::endl;
#endif
if (to->_previous !=0 || to->_next !=0)
@@ -848,10 +848,10 @@ void GLBufferObjectSet::addToBack(GLBufferObject* to)
_tail = to;
}
#if 0
OSG_NOTIFY(osg::NOTICE)<<" a2B after _head = "<<_head<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" a2B after _tail = "<<_tail<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" a2B after to->_previous = "<<to->_previous<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" a2B after to->_next = "<<to->_next<<std::endl;
OSG_NOTICE<<" a2B after _head = "<<_head<<std::endl;
OSG_NOTICE<<" a2B after _tail = "<<_tail<<std::endl;
OSG_NOTICE<<" a2B after to->_previous = "<<to->_previous<<std::endl;
OSG_NOTICE<<" a2B after to->_next = "<<to->_next<<std::endl;
#endif
checkConsistency();
}
@@ -939,7 +939,7 @@ void GLBufferObjectManager::setMaxGLBufferObjectPoolSize(unsigned int size)
if (size<_currGLBufferObjectPoolSize)
{
OSG_NOTIFY(osg::NOTICE)<<"Warning: new MaxGLBufferObjectPoolSize="<<size<<" is smaller than current GLBufferObjectPoolSize="<<_currGLBufferObjectPoolSize<<std::endl;
OSG_NOTICE<<"Warning: new MaxGLBufferObjectPoolSize="<<size<<" is smaller than current GLBufferObjectPoolSize="<<_currGLBufferObjectPoolSize<<std::endl;
}
_maxGLBufferObjectPoolSize = size;
@@ -965,7 +965,7 @@ GLBufferObject* GLBufferObjectManager::generateGLBufferObject(const BufferObject
BufferObjectProfile profile(bufferObject->getTarget(), bufferObject->getUsage(), bufferObject->computeRequiredBufferSize());
// OSG_NOTIFY(osg::NOTICE)<<"GLBufferObjectManager::generateGLBufferObject size="<<bufferObject->computeRequiredBufferSize()<<std::endl;
// OSG_NOTICE<<"GLBufferObjectManager::generateGLBufferObject size="<<bufferObject->computeRequiredBufferSize()<<std::endl;
GLBufferObjectSet* glbos = getGLBufferObjectSet(profile);
return glbos->takeOrGenerate(const_cast<BufferObject*>(bufferObject));
@@ -1049,7 +1049,7 @@ void GLBufferObjectManager::releaseGLBufferObject(GLBufferObject* to)
if (to->_set) to->_set->orphan(to);
else
{
OSG_NOTIFY(osg::NOTICE)<<"GLBufferObjectManager::releaseGLBufferObject(GLBufferObject* to) Not implemented yet"<<std::endl;
OSG_NOTICE<<"GLBufferObjectManager::releaseGLBufferObject(GLBufferObject* to) Not implemented yet"<<std::endl;
}
}
@@ -1065,11 +1065,11 @@ void GLBufferObjectManager::newFrame(osg::FrameStamp* fs)
void GLBufferObjectManager::reportStats()
{
double numFrames(_numFrames==0 ? 1.0 : _numFrames);
OSG_NOTIFY(osg::NOTICE)<<"GLBufferObjectMananger::reportStats()"<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" total _numOfGLBufferObjects="<<_numActiveGLBufferObjects<<", _numOrphanedGLBufferObjects="<<_numOrphanedGLBufferObjects<<" _currGLBufferObjectPoolSize="<<_currGLBufferObjectPoolSize<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" total _numGenerated="<<_numGenerated<<", _generateTime="<<_generateTime<<", averagePerFrame="<<_generateTime/numFrames*1000.0<<"ms"<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" total _numDeleted="<<_numDeleted<<", _deleteTime="<<_deleteTime<<", averagePerFrame="<<_deleteTime/numFrames*1000.0<<"ms"<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" total _numApplied="<<_numApplied<<", _applyTime="<<_applyTime<<", averagePerFrame="<<_applyTime/numFrames*1000.0<<"ms"<<std::endl;
OSG_NOTICE<<"GLBufferObjectMananger::reportStats()"<<std::endl;
OSG_NOTICE<<" total _numOfGLBufferObjects="<<_numActiveGLBufferObjects<<", _numOrphanedGLBufferObjects="<<_numOrphanedGLBufferObjects<<" _currGLBufferObjectPoolSize="<<_currGLBufferObjectPoolSize<<std::endl;
OSG_NOTICE<<" total _numGenerated="<<_numGenerated<<", _generateTime="<<_generateTime<<", averagePerFrame="<<_generateTime/numFrames*1000.0<<"ms"<<std::endl;
OSG_NOTICE<<" total _numDeleted="<<_numDeleted<<", _deleteTime="<<_deleteTime<<", averagePerFrame="<<_deleteTime/numFrames*1000.0<<"ms"<<std::endl;
OSG_NOTICE<<" total _numApplied="<<_numApplied<<", _applyTime="<<_applyTime<<", averagePerFrame="<<_applyTime/numFrames*1000.0<<"ms"<<std::endl;
}
void GLBufferObjectManager::resetStats()
@@ -1172,7 +1172,7 @@ void BufferObject::resizeGLObjectBuffers(unsigned int maxSize)
void BufferObject::releaseGLObjects(State* state) const
{
// OSG_NOTIFY(osg::NOTICE)<<"BufferObject::releaseGLObjects("<<state<<")"<<std::endl;
// OSG_NOTICE<<"BufferObject::releaseGLObjects("<<state<<")"<<std::endl;
if (state)
{
unsigned int contextID = state->getContextID();
@@ -1188,7 +1188,7 @@ void BufferObject::releaseGLObjects(State* state) const
{
if (_glBufferObjects[i].valid())
{
// OSG_NOTIFY(osg::NOTICE)<<" GLBufferObject::releaseGLBufferObject("<<i<<", _glBufferObjects["<<i<<"]="<<_glBufferObjects[i].get()<<")"<<std::endl;
// OSG_NOTICE<<" GLBufferObject::releaseGLBufferObject("<<i<<", _glBufferObjects["<<i<<"]="<<_glBufferObjects[i].get()<<")"<<std::endl;
GLBufferObject::releaseGLBufferObject(i, _glBufferObjects[i].get());
_glBufferObjects[i] = 0;
}
@@ -1212,7 +1212,7 @@ unsigned int BufferObject::addBufferData(BufferData* bd)
_bufferDataList.push_back(bd);
// OSG_NOTIFY(osg::NOTICE)<<"BufferObject "<<this<<":"<<className()<<"::addBufferData("<<bd<<"), bufferIndex= "<<_bufferDataList.size()-1<<std::endl;
// OSG_NOTICE<<"BufferObject "<<this<<":"<<className()<<"::addBufferData("<<bd<<"), bufferIndex= "<<_bufferDataList.size()-1<<std::endl;
return _bufferDataList.size()-1;
}
@@ -1221,11 +1221,11 @@ void BufferObject::removeBufferData(unsigned int index)
{
if (index>=_bufferDataList.size())
{
OSG_NOTIFY(osg::WARN)<<"Error "<<className()<<"::removeBufferData("<<index<<") out of range."<<std::endl;
OSG_WARN<<"Error "<<className()<<"::removeBufferData("<<index<<") out of range."<<std::endl;
return;
}
// OSG_NOTIFY(osg::NOTICE)<<"BufferObject::"<<this<<":"<<className()<<"::removeBufferData("<<index<<"), size= "<<_bufferDataList.size()<<std::endl;
// OSG_NOTICE<<"BufferObject::"<<this<<":"<<className()<<"::removeBufferData("<<index<<"), size= "<<_bufferDataList.size()<<std::endl;
// alter the indices of the BufferData after the entry to be removed so their indices are correctly placed.
for(unsigned int i=index+1; i<_bufferDataList.size(); ++i)
@@ -1245,7 +1245,7 @@ void BufferObject::removeBufferData(unsigned int index)
void BufferObject::removeBufferData(BufferData* bd)
{
// OSG_NOTIFY(osg::NOTICE)<<"BufferObject::"<<this<<":"<<className()<<"::removeBufferData("<<bd<<"), index="<<bd->getBufferIndex()<<" size= "<<_bufferDataList.size()<<std::endl;
// OSG_NOTICE<<"BufferObject::"<<this<<":"<<className()<<"::removeBufferData("<<bd<<"), index="<<bd->getBufferIndex()<<" size= "<<_bufferDataList.size()<<std::endl;
if (!bd || bd->getBufferObject()!=this) return;
@@ -1273,7 +1273,7 @@ void BufferObject::deleteBufferObject(unsigned int contextID,GLuint globj)
osg::ref_ptr<GLBufferObjectManager>& bufferObjectManager = GLBufferObjectManager::getGLBufferObjectManager(contextID);
if (!bufferObjectManager)
{
OSG_NOTIFY(osg::NOTICE)<<"Warning::BufferObject::deleteBufferObject("<<contextID<<", "<<globj<<") unable to get GLBufferObjectManager for context."<<std::endl;
OSG_NOTICE<<"Warning::BufferObject::deleteBufferObject("<<contextID<<", "<<globj<<") unable to get GLBufferObjectManager for context."<<std::endl;
return;
}
osg::ref_ptr<GLBufferObject> glBufferObject = new GLBufferObject(contextID, 0, globj);
@@ -1281,7 +1281,7 @@ void BufferObject::deleteBufferObject(unsigned int contextID,GLuint globj)
GLBufferObjectSet* bufferObjectSet = bufferObjectManager->getGLBufferObjectSet(glBufferObject->getProfile());
if (!bufferObjectSet)
{
OSG_NOTIFY(osg::NOTICE)<<"Warning::BufferObject::deleteBufferObject("<<contextID<<", "<<globj<<") unable to get GLBufferObjectSet for context."<<std::endl;
OSG_NOTICE<<"Warning::BufferObject::deleteBufferObject("<<contextID<<", "<<globj<<") unable to get GLBufferObjectSet for context."<<std::endl;
return;
}
@@ -1412,7 +1412,7 @@ PixelBufferObject::PixelBufferObject(osg::Image* image):
setTarget(GL_PIXEL_UNPACK_BUFFER_ARB);
setUsage(GL_STREAM_DRAW_ARB);
OSG_NOTIFY(osg::INFO)<<"Constructing PixelBufferObject for image="<<image<<std::endl;
OSG_INFO<<"Constructing PixelBufferObject for image="<<image<<std::endl;
setBufferData(0, image);
}

View File

@@ -88,7 +88,7 @@ void Camera::DrawCallback::operator () (osg::RenderInfo& renderInfo) const
}
else
{
OSG_NOTIFY(osg::WARN)<<"Error: Camera::DrawCallback called without valid camera."<<std::endl;
OSG_WARN<<"Error: Camera::DrawCallback called without valid camera."<<std::endl;
}
}
@@ -126,7 +126,7 @@ void Camera::setRenderTargetImplementation(RenderTargetImplementation impl, Rend
}
else
{
OSG_NOTIFY(osg::NOTICE)<<"Warning: Camera::setRenderTargetImplementation(impl,fallback) must have a lower rated fallback than the main target implementation."<<std::endl;
OSG_NOTICE<<"Warning: Camera::setRenderTargetImplementation(impl,fallback) must have a lower rated fallback than the main target implementation."<<std::endl;
setRenderTargetImplementation(impl);
}
}
@@ -264,29 +264,25 @@ void Camera::attach(BufferComponent buffer, GLenum internalFormat)
case DEPTH_BUFFER:
if(_bufferAttachmentMap.find(PACKED_DEPTH_STENCIL_BUFFER) != _bufferAttachmentMap.end())
{
notify(WARN)
<< "Camera: DEPTH_BUFFER already attached as PACKED_DEPTH_STENCIL_BUFFER !"
<< std::endl;
OSG_WARN << "Camera: DEPTH_BUFFER already attached as PACKED_DEPTH_STENCIL_BUFFER !" << std::endl;
}
break;
case STENCIL_BUFFER:
if(_bufferAttachmentMap.find(PACKED_DEPTH_STENCIL_BUFFER) != _bufferAttachmentMap.end())
{
notify(WARN)
<< "Camera: STENCIL_BUFFER already attached as PACKED_DEPTH_STENCIL_BUFFER !"
<< std::endl;
OSG_WARN << "Camera: STENCIL_BUFFER already attached as PACKED_DEPTH_STENCIL_BUFFER !" << std::endl;
}
break;
case PACKED_DEPTH_STENCIL_BUFFER:
if(_bufferAttachmentMap.find(DEPTH_BUFFER) != _bufferAttachmentMap.end())
{
notify(WARN) << "Camera: DEPTH_BUFFER already attached !" << std::endl;
OSG_WARN << "Camera: DEPTH_BUFFER already attached !" << std::endl;
}
if(_bufferAttachmentMap.find(STENCIL_BUFFER) != _bufferAttachmentMap.end())
{
notify(WARN) << "Camera: STENCIL_BUFFER already attached !" << std::endl;
OSG_WARN << "Camera: STENCIL_BUFFER already attached !" << std::endl;
}
break;
default:
@@ -393,7 +389,7 @@ void Camera::inheritCullSettings(const CullSettings& settings, unsigned int inhe
const Camera* camera = dynamic_cast<const Camera*>(&settings);
if (camera)
{
//OSG_NOTIFY(osg::NOTICE)<<"Inheriting slave Camera"<<std::endl;
//OSG_NOTICE<<"Inheriting slave Camera"<<std::endl;
if (inheritanceMask & CLEAR_COLOR)
_clearColor = camera->_clearColor;

View File

@@ -48,7 +48,7 @@ void ClampColor::apply(State& state) const
if (!extensions->isClampColorSupported())
{
notify(WARN)<<"Warning: ClampColor::apply(..) failed, ClampColor is not support by OpenGL driver."<<std::endl;
OSG_WARN<<"Warning: ClampColor::apply(..) failed, ClampColor is not support by OpenGL driver."<<std::endl;
return;
}
@@ -108,7 +108,7 @@ void ClampColor::Extensions::glClampColor(GLenum target, GLenum mode) const
}
else
{
notify(WARN)<<"Error: glClampColor not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glClampColor not supported by OpenGL driver"<<std::endl;
}
}

View File

@@ -78,7 +78,7 @@ void ClipPlane::apply(State&) const
#if defined(OSG_GL_FIXED_FUNCTION_AVAILABLE) && !defined(OSG_GLES1_AVAILABLE)
glClipPlane((GLenum)(GL_CLIP_PLANE0+_clipPlaneNum),_clipPlane.ptr());
#else
osg::notify(osg::NOTICE)<<"Warning: ClipPlane::apply(State&) - not supported."<<std::endl;
OSG_NOTICE<<"Warning: ClipPlane::apply(State&) - not supported."<<std::endl;
#endif
}

View File

@@ -125,9 +125,9 @@ void ClusterCullingCallback::computeFrom(const osg::Drawable* drawable)
cdf.set(_controlPoint,_normal);
drawable->accept(cdf);
// osg::notify(osg::NOTICE)<<"ClusterCullingCallback::computeFrom() _controlPoint="<<_controlPoint<<std::endl;
// osg::notify(osg::NOTICE)<<" _normal="<<_normal<<std::endl;
// osg::notify(osg::NOTICE)<<" cdf._deviation="<<cdf._deviation<<std::endl;
// OSG_NOTICE<<"ClusterCullingCallback::computeFrom() _controlPoint="<<_controlPoint<<std::endl;
// OSG_NOTICE<<" _normal="<<_normal<<std::endl;
// OSG_NOTICE<<" cdf._deviation="<<cdf._deviation<<std::endl;
if (_normal.length2()==0.0) _deviation = -1.0f;
@@ -183,8 +183,8 @@ bool ClusterCullingCallback::cull(osg::NodeVisitor* nv, osg::Drawable* , osg::St
float deviation = (eye_cp * _normal)/radius;
// osg::notify(osg::NOTICE)<<"ClusterCullingCallback::cull() _normal="<<_normal<<" _controlPointtest="<<_controlPoint<<" eye_cp="<<eye_cp<<std::endl;
// osg::notify(osg::NOTICE)<<" deviation="<<deviation<<" _deviation="<<_deviation<<" test="<<(deviation < _deviation)<<std::endl;
// OSG_NOTICE<<"ClusterCullingCallback::cull() _normal="<<_normal<<" _controlPointtest="<<_controlPoint<<" eye_cp="<<eye_cp<<std::endl;
// OSG_NOTICE<<" deviation="<<deviation<<" _deviation="<<_deviation<<" test="<<(deviation < _deviation)<<std::endl;
return deviation < _deviation;
}

View File

@@ -95,7 +95,7 @@ static ApplicationUsageProxy ApplicationUsageProxyCullSettings_e1(ApplicationUsa
void CullSettings::readEnvironmentalVariables()
{
OSG_NOTIFY(osg::INFO)<<"CullSettings::readEnvironmentalVariables()"<<std::endl;
OSG_INFO<<"CullSettings::readEnvironmentalVariables()"<<std::endl;
char *ptr;
@@ -105,7 +105,7 @@ void CullSettings::readEnvironmentalVariables()
else if (strcmp(ptr,"COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES")==0) _computeNearFar = COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES;
else if (strcmp(ptr,"COMPUTE_NEAR_FAR_USING_PRIMITIVES")==0) _computeNearFar = COMPUTE_NEAR_FAR_USING_PRIMITIVES;
OSG_NOTIFY(osg::INFO)<<"Set compute near far mode to "<<_computeNearFar<<std::endl;
OSG_INFO<<"Set compute near far mode to "<<_computeNearFar<<std::endl;
}
@@ -113,7 +113,7 @@ void CullSettings::readEnvironmentalVariables()
{
_nearFarRatio = osg::asciiToDouble(ptr);
OSG_NOTIFY(osg::INFO)<<"Set near/far ratio to "<<_nearFarRatio<<std::endl;
OSG_INFO<<"Set near/far ratio to "<<_nearFarRatio<<std::endl;
}
}
@@ -134,7 +134,7 @@ void CullSettings::readCommandLine(ArgumentParser& arguments)
else if (str=="COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES") _computeNearFar = COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES;
else if (str=="COMPUTE_NEAR_FAR_USING_PRIMITIVES") _computeNearFar = COMPUTE_NEAR_FAR_USING_PRIMITIVES;
OSG_NOTIFY(osg::INFO)<<"Set compute near far mode to "<<_computeNearFar<<std::endl;
OSG_INFO<<"Set compute near far mode to "<<_computeNearFar<<std::endl;
}
double value;
@@ -142,7 +142,7 @@ void CullSettings::readCommandLine(ArgumentParser& arguments)
{
_nearFarRatio = value;
OSG_NOTIFY(osg::INFO)<<"Set near/far ratio to "<<_nearFarRatio<<std::endl;
OSG_INFO<<"Set near/far ratio to "<<_nearFarRatio<<std::endl;
}
}

View File

@@ -182,7 +182,7 @@ void DisplaySettings::setMaxNumberOfGraphicsContexts(unsigned int num)
unsigned int DisplaySettings::getMaxNumberOfGraphicsContexts() const
{
// osg::notify(osg::NOTICE)<<"getMaxNumberOfGraphicsContexts()="<<_maxNumOfGraphicsContexts<<std::endl;
// OSG_NOTICE<<"getMaxNumberOfGraphicsContexts()="<<_maxNumOfGraphicsContexts<<std::endl;
return _maxNumOfGraphicsContexts;
}

View File

@@ -111,7 +111,7 @@ void DrawPixels::drawImplementation(RenderInfo&) const
_image->data() );
}
#else
osg::notify(osg::NOTICE)<<"Warning: DrawPixels::drawImplementation(RenderInfo&) - not supported."<<std::endl;
OSG_NOTICE<<"Warning: DrawPixels::drawImplementation(RenderInfo&) - not supported."<<std::endl;
#endif
}

View File

@@ -61,7 +61,7 @@ GLuint Drawable::generateDisplayList(unsigned int contextID, unsigned int sizeHi
DisplayListMap::iterator itr = dll.lower_bound(sizeHint);
if (itr!=dll.end())
{
// osg::notify(osg::NOTICE)<<"Reusing a display list of size = "<<itr->first<<" for requested size = "<<sizeHint<<std::endl;
// OSG_NOTICE<<"Reusing a display list of size = "<<itr->first<<" for requested size = "<<sizeHint<<std::endl;
++s_numberDrawablesReusedLastInLastFrame;
@@ -72,13 +72,13 @@ GLuint Drawable::generateDisplayList(unsigned int contextID, unsigned int sizeHi
}
else
{
// osg::notify(osg::NOTICE)<<"Creating a new display list of size = "<<sizeHint<<" although "<<dll.size()<<" are available"<<std::endl;
// OSG_NOTICE<<"Creating a new display list of size = "<<sizeHint<<" although "<<dll.size()<<" are available"<<std::endl;
++s_numberNewDrawablesInLastFrame;
return glGenLists( 1 );
}
}
#else
osg::notify(osg::NOTICE)<<"Warning: Drawable::generateDisplayList(..) - not supported."<<std::endl;
OSG_NOTICE<<"Warning: Drawable::generateDisplayList(..) - not supported."<<std::endl;
return 0;
#endif
}
@@ -105,7 +105,7 @@ void Drawable::deleteDisplayList(unsigned int contextID,GLuint globj, unsigned i
s_deletedDisplayListCache[contextID].insert(DisplayListMap::value_type(sizeHint,globj));
}
#else
osg::notify(osg::NOTICE)<<"Warning: Drawable::deleteDisplayList(..) - not supported."<<std::endl;
OSG_NOTICE<<"Warning: Drawable::deleteDisplayList(..) - not supported."<<std::endl;
#endif
}
@@ -125,7 +125,7 @@ void Drawable::flushAllDeletedDisplayLists(unsigned int contextID)
dll.clear();
#else
osg::notify(osg::NOTICE)<<"Warning: Drawable::deleteDisplayList(..) - not supported."<<std::endl;
OSG_NOTICE<<"Warning: Drawable::deleteDisplayList(..) - not supported."<<std::endl;
#endif
}
@@ -177,7 +177,7 @@ void Drawable::flushDeletedDisplayLists(unsigned int contextID, double& availabl
if (noDeleted+dll.size() != prev_size)
{
osg::notify(osg::WARN)<<"Error in delete"<<std::endl;
OSG_WARN<<"Error in delete"<<std::endl;
}
}
else
@@ -202,17 +202,17 @@ void Drawable::flushDeletedDisplayLists(unsigned int contextID, double& availabl
if (noDeleted+dll.size() != prev_size)
{
osg::notify(osg::WARN)<<"Error in delete"<<std::endl;
OSG_WARN<<"Error in delete"<<std::endl;
}
}
}
elapsedTime = timer.delta_s(start_tick,timer.tick());
if (noDeleted!=0) notify(INFO)<<"Number display lists deleted = "<<noDeleted<<" elapsed time"<<elapsedTime<<std::endl;
if (noDeleted!=0) OSG_INFO<<"Number display lists deleted = "<<noDeleted<<" elapsed time"<<elapsedTime<<std::endl;
availableTime -= elapsedTime;
#else
osg::notify(osg::NOTICE)<<"Warning: Drawable::flushDeletedDisplayLists(..) - not supported."<<std::endl;
OSG_NOTICE<<"Warning: Drawable::flushDeletedDisplayLists(..) - not supported."<<std::endl;
#endif
}
@@ -491,7 +491,7 @@ void Drawable::compileGLObjects(RenderInfo& renderInfo) const
glEndList();
#else
osg::notify(osg::NOTICE)<<"Warning: Drawable::compileGLObjects(RenderInfo&) - not supported."<<std::endl;
OSG_NOTICE<<"Warning: Drawable::compileGLObjects(RenderInfo&) - not supported."<<std::endl;
#endif
}
@@ -595,7 +595,7 @@ void Drawable::setUseDisplayList(bool flag)
{
if (flag)
{
notify(WARN)<<"Warning: attempt to setUseDisplayList(true) on a drawable with does not support display lists."<<std::endl;
OSG_WARN<<"Warning: attempt to setUseDisplayList(true) on a drawable with does not support display lists."<<std::endl;
}
else
{
@@ -613,7 +613,7 @@ void Drawable::setUseVertexBufferObjects(bool flag)
{
// _useVertexBufferObjects = true;
// osg::notify(osg::NOTICE)<<"Drawable::setUseVertexBufferObjects("<<flag<<")"<<std::endl;
// OSG_NOTICE<<"Drawable::setUseVertexBufferObjects("<<flag<<")"<<std::endl;
// if value unchanged simply return.
if (_useVertexBufferObjects==flag) return;
@@ -796,9 +796,9 @@ BoundingBox Drawable::computeBound() const
non_const_this->accept(cb);
#if 0
osg::notify(osg::NOTICE)<<"computeBound() "<<cb._bb.xMin()<<", "<<cb._bb.xMax()<<", "<<std::endl;
osg::notify(osg::NOTICE)<<" "<<cb._bb.yMin()<<", "<<cb._bb.yMax()<<", "<<std::endl;
osg::notify(osg::NOTICE)<<" "<<cb._bb.zMin()<<", "<<cb._bb.zMax()<<", "<<std::endl;
OSG_NOTICE<<"computeBound() "<<cb._bb.xMin()<<", "<<cb._bb.xMax()<<", "<<std::endl;
OSG_NOTICE<<" "<<cb._bb.yMin()<<", "<<cb._bb.yMax()<<", "<<std::endl;
OSG_NOTICE<<" "<<cb._bb.zMin()<<", "<<cb._bb.zMax()<<", "<<std::endl;
#endif
return cb._bb;
@@ -1018,7 +1018,7 @@ void Drawable::Extensions::glFogCoordfv(const GLfloat* coord) const
}
else
{
notify(WARN)<<"Error: glFogCoordfv not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glFogCoordfv not supported by OpenGL driver"<<std::endl;
}
}
@@ -1030,7 +1030,7 @@ void Drawable::Extensions::glSecondaryColor3ubv(const GLubyte* coord) const
}
else
{
notify(WARN)<<"Error: glSecondaryColor3ubv not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glSecondaryColor3ubv not supported by OpenGL driver"<<std::endl;
}
}
@@ -1042,7 +1042,7 @@ void Drawable::Extensions::glSecondaryColor3fv(const GLfloat* coord) const
}
else
{
notify(WARN)<<"Error: glSecondaryColor3fv not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glSecondaryColor3fv not supported by OpenGL driver"<<std::endl;
}
}
@@ -1054,7 +1054,7 @@ void Drawable::Extensions::glMultiTexCoord1f(GLenum target,GLfloat coord) const
}
else
{
notify(WARN)<<"Error: glMultiTexCoord1f not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glMultiTexCoord1f not supported by OpenGL driver"<<std::endl;
}
}
@@ -1066,7 +1066,7 @@ void Drawable::Extensions::glMultiTexCoord2fv(GLenum target,const GLfloat* coord
}
else
{
notify(WARN)<<"Error: glMultiTexCoord2fv not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glMultiTexCoord2fv not supported by OpenGL driver"<<std::endl;
}
}
@@ -1078,7 +1078,7 @@ void Drawable::Extensions::glMultiTexCoord3fv(GLenum target,const GLfloat* coord
}
else
{
notify(WARN)<<"Error: _glMultiTexCoord3fv not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: _glMultiTexCoord3fv not supported by OpenGL driver"<<std::endl;
}
}
@@ -1090,7 +1090,7 @@ void Drawable::Extensions::glMultiTexCoord4fv(GLenum target,const GLfloat* coord
}
else
{
notify(WARN)<<"Error: glMultiTexCoord4fv not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glMultiTexCoord4fv not supported by OpenGL driver"<<std::endl;
}
}
@@ -1102,7 +1102,7 @@ void Drawable::Extensions::glMultiTexCoord1d(GLenum target,GLdouble coord) const
}
else
{
notify(WARN)<<"Error: glMultiTexCoord1d not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glMultiTexCoord1d not supported by OpenGL driver"<<std::endl;
}
}
@@ -1114,7 +1114,7 @@ void Drawable::Extensions::glMultiTexCoord2dv(GLenum target,const GLdouble* coor
}
else
{
notify(WARN)<<"Error: glMultiTexCoord2dv not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glMultiTexCoord2dv not supported by OpenGL driver"<<std::endl;
}
}
@@ -1126,7 +1126,7 @@ void Drawable::Extensions::glMultiTexCoord3dv(GLenum target,const GLdouble* coor
}
else
{
notify(WARN)<<"Error: _glMultiTexCoord3dv not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: _glMultiTexCoord3dv not supported by OpenGL driver"<<std::endl;
}
}
@@ -1138,7 +1138,7 @@ void Drawable::Extensions::glMultiTexCoord4dv(GLenum target,const GLdouble* coor
}
else
{
notify(WARN)<<"Error: glMultiTexCoord4dv not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glMultiTexCoord4dv not supported by OpenGL driver"<<std::endl;
}
}
@@ -1150,7 +1150,7 @@ void Drawable::Extensions::glVertexAttrib1s(unsigned int index, GLshort s) const
}
else
{
notify(WARN)<<"Error: glVertexAttrib1s not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glVertexAttrib1s not supported by OpenGL driver"<<std::endl;
}
}
@@ -1162,7 +1162,7 @@ void Drawable::Extensions::glVertexAttrib1f(unsigned int index, GLfloat f) const
}
else
{
notify(WARN)<<"Error: glVertexAttrib1f not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glVertexAttrib1f not supported by OpenGL driver"<<std::endl;
}
}
@@ -1174,7 +1174,7 @@ void Drawable::Extensions::glVertexAttrib1d(unsigned int index, GLdouble f) cons
}
else
{
notify(WARN)<<"Error: glVertexAttrib1d not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glVertexAttrib1d not supported by OpenGL driver"<<std::endl;
}
}
@@ -1186,7 +1186,7 @@ void Drawable::Extensions::glVertexAttrib2fv(unsigned int index, const GLfloat *
}
else
{
notify(WARN)<<"Error: glVertexAttrib2fv not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glVertexAttrib2fv not supported by OpenGL driver"<<std::endl;
}
}
@@ -1198,7 +1198,7 @@ void Drawable::Extensions::glVertexAttrib3fv(unsigned int index, const GLfloat *
}
else
{
notify(WARN)<<"Error: glVertexAttrib3fv not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glVertexAttrib3fv not supported by OpenGL driver"<<std::endl;
}
}
@@ -1210,7 +1210,7 @@ void Drawable::Extensions::glVertexAttrib4fv(unsigned int index, const GLfloat *
}
else
{
notify(WARN)<<"Error: glVertexAttrib4fv not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glVertexAttrib4fv not supported by OpenGL driver"<<std::endl;
}
}
@@ -1222,7 +1222,7 @@ void Drawable::Extensions::glVertexAttrib2dv(unsigned int index, const GLdouble
}
else
{
notify(WARN)<<"Error: glVertexAttrib2dv not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glVertexAttrib2dv not supported by OpenGL driver"<<std::endl;
}
}
@@ -1234,7 +1234,7 @@ void Drawable::Extensions::glVertexAttrib3dv(unsigned int index, const GLdouble
}
else
{
notify(WARN)<<"Error: glVertexAttrib3dv not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glVertexAttrib3dv not supported by OpenGL driver"<<std::endl;
}
}
@@ -1246,7 +1246,7 @@ void Drawable::Extensions::glVertexAttrib4dv(unsigned int index, const GLdouble
}
else
{
notify(WARN)<<"Error: glVertexAttrib4dv not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glVertexAttrib4dv not supported by OpenGL driver"<<std::endl;
}
}
@@ -1258,7 +1258,7 @@ void Drawable::Extensions::glVertexAttrib4ubv(unsigned int index, const GLubyte
}
else
{
notify(WARN)<<"Error: glVertexAttrib4ubv not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glVertexAttrib4ubv not supported by OpenGL driver"<<std::endl;
}
}
@@ -1270,38 +1270,38 @@ void Drawable::Extensions::glVertexAttrib4Nubv(unsigned int index, const GLubyte
}
else
{
notify(WARN)<<"Error: glVertexAttrib4Nubv not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glVertexAttrib4Nubv not supported by OpenGL driver"<<std::endl;
}
}
void Drawable::Extensions::glGenBuffers(GLsizei n, GLuint *buffers) const
{
if (_glGenBuffers) _glGenBuffers(n, buffers);
else notify(WARN)<<"Error: glGenBuffers not supported by OpenGL driver"<<std::endl;
else OSG_WARN<<"Error: glGenBuffers not supported by OpenGL driver"<<std::endl;
}
void Drawable::Extensions::glBindBuffer(GLenum target, GLuint buffer) const
{
if (_glBindBuffer) _glBindBuffer(target, buffer);
else notify(WARN)<<"Error: glBindBuffer not supported by OpenGL driver"<<std::endl;
else OSG_WARN<<"Error: glBindBuffer not supported by OpenGL driver"<<std::endl;
}
void Drawable::Extensions::glBufferData(GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage) const
{
if (_glBufferData) _glBufferData(target, size, data, usage);
else notify(WARN)<<"Error: glBufferData not supported by OpenGL driver"<<std::endl;
else OSG_WARN<<"Error: glBufferData not supported by OpenGL driver"<<std::endl;
}
void Drawable::Extensions::glBufferSubData(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data) const
{
if (_glBufferSubData) _glBufferSubData(target, offset, size, data);
else notify(WARN)<<"Error: glBufferData not supported by OpenGL driver"<<std::endl;
else OSG_WARN<<"Error: glBufferData not supported by OpenGL driver"<<std::endl;
}
void Drawable::Extensions::glDeleteBuffers(GLsizei n, const GLuint *buffers) const
{
if (_glDeleteBuffers) _glDeleteBuffers(n, buffers);
else notify(WARN)<<"Error: glBufferData not supported by OpenGL driver"<<std::endl;
else OSG_WARN<<"Error: glBufferData not supported by OpenGL driver"<<std::endl;
}
GLboolean Drawable::Extensions::glIsBuffer (GLuint buffer) const
@@ -1309,7 +1309,7 @@ GLboolean Drawable::Extensions::glIsBuffer (GLuint buffer) const
if (_glIsBuffer) return _glIsBuffer(buffer);
else
{
notify(WARN)<<"Error: glIsBuffer not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glIsBuffer not supported by OpenGL driver"<<std::endl;
return GL_FALSE;
}
}
@@ -1317,7 +1317,7 @@ GLboolean Drawable::Extensions::glIsBuffer (GLuint buffer) const
void Drawable::Extensions::glGetBufferSubData (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data) const
{
if (_glGetBufferSubData) _glGetBufferSubData(target,offset,size,data);
else notify(WARN)<<"Error: glGetBufferSubData not supported by OpenGL driver"<<std::endl;
else OSG_WARN<<"Error: glGetBufferSubData not supported by OpenGL driver"<<std::endl;
}
GLvoid* Drawable::Extensions::glMapBuffer (GLenum target, GLenum access) const
@@ -1325,7 +1325,7 @@ GLvoid* Drawable::Extensions::glMapBuffer (GLenum target, GLenum access) const
if (_glMapBuffer) return _glMapBuffer(target,access);
else
{
notify(WARN)<<"Error: glMapBuffer not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glMapBuffer not supported by OpenGL driver"<<std::endl;
return 0;
}
}
@@ -1335,7 +1335,7 @@ GLboolean Drawable::Extensions::glUnmapBuffer (GLenum target) const
if (_glUnmapBuffer) return _glUnmapBuffer(target);
else
{
notify(WARN)<<"Error: glUnmapBuffer not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glUnmapBuffer not supported by OpenGL driver"<<std::endl;
return GL_FALSE;
}
}
@@ -1343,13 +1343,13 @@ GLboolean Drawable::Extensions::glUnmapBuffer (GLenum target) const
void Drawable::Extensions::glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params) const
{
if (_glGetBufferParameteriv) _glGetBufferParameteriv(target,pname,params);
else notify(WARN)<<"Error: glGetBufferParameteriv not supported by OpenGL driver"<<std::endl;
else OSG_WARN<<"Error: glGetBufferParameteriv not supported by OpenGL driver"<<std::endl;
}
void Drawable::Extensions::glGetBufferPointerv (GLenum target, GLenum pname, GLvoid* *params) const
{
if (_glGetBufferPointerv) _glGetBufferPointerv(target,pname,params);
else notify(WARN)<<"Error: glGetBufferPointerv not supported by OpenGL driver"<<std::endl;
else OSG_WARN<<"Error: glGetBufferPointerv not supported by OpenGL driver"<<std::endl;
}
@@ -1361,7 +1361,7 @@ void Drawable::Extensions::glGenOcclusionQueries( GLsizei n, GLuint *ids ) const
}
else
{
osg::notify(osg::WARN)<<"Error: glGenOcclusionQueries not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glGenOcclusionQueries not supported by OpenGL driver"<<std::endl;
}
}
@@ -1373,7 +1373,7 @@ void Drawable::Extensions::glDeleteOcclusionQueries( GLsizei n, const GLuint *id
}
else
{
osg::notify(osg::WARN)<<"Error: glDeleteOcclusionQueries not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glDeleteOcclusionQueries not supported by OpenGL driver"<<std::endl;
}
}
@@ -1385,7 +1385,7 @@ GLboolean Drawable::Extensions::glIsOcclusionQuery( GLuint id ) const
}
else
{
osg::notify(osg::WARN)<<"Error: glIsOcclusionQuery not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glIsOcclusionQuery not supported by OpenGL driver"<<std::endl;
}
return GLboolean( 0 );
@@ -1399,7 +1399,7 @@ void Drawable::Extensions::glBeginOcclusionQuery( GLuint id ) const
}
else
{
osg::notify(osg::WARN)<<"Error: glBeginOcclusionQuery not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glBeginOcclusionQuery not supported by OpenGL driver"<<std::endl;
}
}
@@ -1411,7 +1411,7 @@ void Drawable::Extensions::glEndOcclusionQuery() const
}
else
{
osg::notify(osg::WARN)<<"Error: glEndOcclusionQuery not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glEndOcclusionQuery not supported by OpenGL driver"<<std::endl;
}
}
@@ -1423,7 +1423,7 @@ void Drawable::Extensions::glGetOcclusionQueryiv( GLuint id, GLenum pname, GLint
}
else
{
osg::notify(osg::WARN)<<"Error: glGetOcclusionQueryiv not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glGetOcclusionQueryiv not supported by OpenGL driver"<<std::endl;
}
}
@@ -1435,7 +1435,7 @@ void Drawable::Extensions::glGetOcclusionQueryuiv( GLuint id, GLenum pname, GLui
}
else
{
osg::notify(osg::WARN)<<"Error: glGetOcclusionQueryuiv not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glGetOcclusionQueryuiv not supported by OpenGL driver"<<std::endl;
}
}
@@ -1444,7 +1444,7 @@ void Drawable::Extensions::glGetQueryiv(GLenum target, GLenum pname, GLint *para
if (_gl_get_queryiv_arb)
_gl_get_queryiv_arb(target, pname, params);
else
osg::notify(osg::WARN) << "Error: glGetQueryiv not supported by OpenGL driver" << std::endl;
OSG_WARN << "Error: glGetQueryiv not supported by OpenGL driver" << std::endl;
}
void Drawable::Extensions::glGenQueries(GLsizei n, GLuint *ids) const
@@ -1452,7 +1452,7 @@ void Drawable::Extensions::glGenQueries(GLsizei n, GLuint *ids) const
if (_gl_gen_queries_arb)
_gl_gen_queries_arb(n, ids);
else
osg::notify(osg::WARN) << "Error: glGenQueries not supported by OpenGL driver" << std::endl;
OSG_WARN << "Error: glGenQueries not supported by OpenGL driver" << std::endl;
}
void Drawable::Extensions::glBeginQuery(GLenum target, GLuint id) const
@@ -1460,7 +1460,7 @@ void Drawable::Extensions::glBeginQuery(GLenum target, GLuint id) const
if (_gl_begin_query_arb)
_gl_begin_query_arb(target, id);
else
osg::notify(osg::WARN) << "Error: glBeginQuery not supported by OpenGL driver" << std::endl;
OSG_WARN << "Error: glBeginQuery not supported by OpenGL driver" << std::endl;
}
void Drawable::Extensions::glEndQuery(GLenum target) const
@@ -1468,14 +1468,14 @@ void Drawable::Extensions::glEndQuery(GLenum target) const
if (_gl_end_query_arb)
_gl_end_query_arb(target);
else
osg::notify(osg::WARN) << "Error: glEndQuery not supported by OpenGL driver" << std::endl;
OSG_WARN << "Error: glEndQuery not supported by OpenGL driver" << std::endl;
}
GLboolean Drawable::Extensions::glIsQuery(GLuint id) const
{
if (_gl_is_query_arb) return _gl_is_query_arb(id);
osg::notify(osg::WARN) << "Error: glIsQuery not supported by OpenGL driver" << std::endl;
OSG_WARN << "Error: glIsQuery not supported by OpenGL driver" << std::endl;
return false;
}
@@ -1484,7 +1484,7 @@ void Drawable::Extensions::glDeleteQueries(GLsizei n, const GLuint *ids) const
if (_gl_delete_queries_arb)
_gl_delete_queries_arb(n, ids);
else
osg::notify(osg::WARN) << "Error: glIsQuery not supported by OpenGL driver" << std::endl;
OSG_WARN << "Error: glIsQuery not supported by OpenGL driver" << std::endl;
}
void Drawable::Extensions::glGetQueryObjectiv(GLuint id, GLenum pname, GLint *params) const
@@ -1492,7 +1492,7 @@ void Drawable::Extensions::glGetQueryObjectiv(GLuint id, GLenum pname, GLint *pa
if (_gl_get_query_objectiv_arb)
_gl_get_query_objectiv_arb(id, pname, params);
else
osg::notify(osg::WARN) << "Error: glGetQueryObjectiv not supported by OpenGL driver" << std::endl;
OSG_WARN << "Error: glGetQueryObjectiv not supported by OpenGL driver" << std::endl;
}
void Drawable::Extensions::glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params) const
@@ -1500,7 +1500,7 @@ void Drawable::Extensions::glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *
if (_gl_get_query_objectuiv_arb)
_gl_get_query_objectuiv_arb(id, pname, params);
else
osg::notify(osg::WARN) << "Error: glGetQueryObjectuiv not supported by OpenGL driver" << std::endl;
OSG_WARN << "Error: glGetQueryObjectuiv not supported by OpenGL driver" << std::endl;
}
void Drawable::Extensions::glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64EXT *params) const
@@ -1508,5 +1508,5 @@ void Drawable::Extensions::glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint
if (_gl_get_query_objectui64v)
_gl_get_query_objectui64v(id, pname, params);
else
osg::notify(osg::WARN) << "Error: glGetQueryObjectui64v not supported by OpenGL driver" << std::endl;
OSG_WARN << "Error: glGetQueryObjectui64v not supported by OpenGL driver" << std::endl;
}

View File

@@ -154,15 +154,15 @@ void FragmentProgram::apply(State& state) const
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorposition);
if (errorposition != -1)
{
notify(osg::FATAL) << "FragmentProgram: " << glGetString(GL_PROGRAM_ERROR_STRING_ARB) << std::endl;
OSG_FATAL << "FragmentProgram: " << glGetString(GL_PROGRAM_ERROR_STRING_ARB) << std::endl;
std::string::size_type start = _fragmentProgram.rfind('\n', errorposition);
std::string::size_type stop = _fragmentProgram.find('\n', errorposition);
if (start!=std::string::npos && stop!=std::string::npos)
{
notify(osg::FATAL) << " : " << _fragmentProgram.substr(start+1, stop-start-2) << std::endl;
OSG_FATAL << " : " << _fragmentProgram.substr(start+1, stop-start-2) << std::endl;
std::string pointAtproblem(errorposition-(start+1), ' ');
notify(osg::FATAL) << " : " << pointAtproblem << '^' << std::endl;
OSG_FATAL << " : " << pointAtproblem << '^' << std::endl;
}
return;
}
@@ -191,7 +191,7 @@ void FragmentProgram::apply(State& state) const
glMatrixMode(GL_MODELVIEW); // restore matrix mode
}
#else
osg::notify(osg::NOTICE)<<"Warning: FragmentProgram::apply(State&) - not supported."<<std::endl;
OSG_NOTICE<<"Warning: FragmentProgram::apply(State&) - not supported."<<std::endl;
#endif
}
@@ -277,7 +277,7 @@ void FragmentProgram::Extensions::glBindProgram(GLenum target, GLuint id) const
}
else
{
notify(WARN)<<"Error: glBindProgram not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glBindProgram not supported by OpenGL driver"<<std::endl;
}
}
@@ -289,7 +289,7 @@ void FragmentProgram::Extensions::glGenPrograms(GLsizei n, GLuint *programs) con
}
else
{
notify(WARN)<<"Error: glGenPrograms not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glGenPrograms not supported by OpenGL driver"<<std::endl;
}
}
@@ -301,7 +301,7 @@ void FragmentProgram::Extensions::glDeletePrograms(GLsizei n, GLuint *programs)
}
else
{
notify(WARN)<<"Error: glDeletePrograms not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glDeletePrograms not supported by OpenGL driver"<<std::endl;
}
}
@@ -313,7 +313,7 @@ void FragmentProgram::Extensions::glProgramString(GLenum target, GLenum format,
}
else
{
notify(WARN)<<"Error: glProgramString not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glProgramString not supported by OpenGL driver"<<std::endl;
}
}
@@ -325,6 +325,6 @@ void FragmentProgram::Extensions::glProgramLocalParameter4fv(GLenum target, GLui
}
else
{
notify(WARN)<<"Error: glProgramLocalParameter4fv not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glProgramLocalParameter4fv not supported by OpenGL driver"<<std::endl;
}
}

View File

@@ -240,7 +240,7 @@ GLuint RenderBuffer::getObjectID(unsigned int contextID, const FBOExtensions *ex
// samples must be >= color samples.
if (_samples < _colorSamples)
{
notify(WARN) << "Coverage samples must be greater than or equal to color samples."
OSG_WARN << "Coverage samples must be greater than or equal to color samples."
" Setting coverage samples equal to color samples." << std::endl;
const_cast<RenderBuffer*>(this)->setSamples(_colorSamples);
}
@@ -458,12 +458,12 @@ FrameBufferAttachment::FrameBufferAttachment(Camera::Attachment& attachment)
}
else
{
osg::notify(osg::WARN)<<"Error: FrameBufferAttachment::FrameBufferAttachment(Camera::Attachment&) passed an empty osg::Image, image must be allocated first."<<std::endl;
OSG_WARN<<"Error: FrameBufferAttachment::FrameBufferAttachment(Camera::Attachment&) passed an empty osg::Image, image must be allocated first."<<std::endl;
}
return;
}
osg::notify(osg::WARN)<<"Error: FrameBufferAttachment::FrameBufferAttachment(Camera::Attachment&) passed an unrecognised Texture type."<<std::endl;
OSG_WARN<<"Error: FrameBufferAttachment::FrameBufferAttachment(Camera::Attachment&) passed an unrecognised Texture type."<<std::endl;
}
@@ -760,7 +760,7 @@ void FrameBufferObject::apply(State &state, BindTarget target) const
if (!ext->isSupported())
{
_unsupported[contextID] = 1;
notify(WARN) << "Warning: EXT_framebuffer_object is not supported" << std::endl;
OSG_WARN << "Warning: EXT_framebuffer_object is not supported" << std::endl;
return;
}
@@ -778,7 +778,7 @@ void FrameBufferObject::apply(State &state, BindTarget target) const
ext->glGenFramebuffers(1, &fboID);
if (fboID == 0)
{
notify(WARN) << "Warning: FrameBufferObject: could not create the FBO" << std::endl;
OSG_WARN << "Warning: FrameBufferObject: could not create the FBO" << std::endl;
return;
}
@@ -832,7 +832,7 @@ void FrameBufferObject::apply(State &state, BindTarget target) const
}
else
{
notify(WARN) <<
OSG_WARN <<
"Warning: FrameBufferObject: could not attach PACKED_DEPTH_STENCIL_BUFFER, "
"EXT_packed_depth_stencil is not supported !" << std::endl;
}

View File

@@ -349,7 +349,7 @@ void GL2Extensions::setupGL2Extensions(unsigned int contextID)
_glslLanguageVersion = 1.0f;
}
OSG_NOTIFY(osg::INFO)
OSG_INFO
<< "glVersion=" << getGlVersion() << ", "
<< "isGlslSupported=" << (isGlslSupported() ? "YES" : "NO") << ", "
<< "glslLanguageVersion=" << getLanguageVersion()
@@ -519,7 +519,7 @@ void GL2Extensions::Set(unsigned int contextID, GL2Extensions* extensions)
static void NotSupported( const char* funcName )
{
OSG_NOTIFY(osg::WARN)
OSG_WARN
<<"Error: "<<funcName<<" not supported by OpenGL driver"<<std::endl;
}

View File

@@ -140,7 +140,7 @@ bool osg::isGLExtensionOrVersionSupported(unsigned int contextID, const char *ex
}
else
{
osg::notify( osg::WARN ) << "isGLExtensionOrVersionSupported: Can't obtain glGetStringi function pointer." << std::endl;
OSG_WARN << "isGLExtensionOrVersionSupported: Can't obtain glGetStringi function pointer." << std::endl;
}
}
else
@@ -376,7 +376,7 @@ std::string& osg::getGLExtensionDisableString()
void* osg::getGLExtensionFuncPtr(const char *funcName)
{
// OSG_NOTIFY(osg::NOTICE)<<"osg::getGLExtensionFuncPtr("<<funcName<<")"<<std::endl;
// OSG_NOTICE<<"osg::getGLExtensionFuncPtr("<<funcName<<")"<<std::endl;
#if defined(WIN32)

View File

@@ -87,8 +87,8 @@ bool Geode::removeDrawables(unsigned int pos,unsigned int numDrawablesToRemove)
unsigned int endOfRemoveRange = pos+numDrawablesToRemove;
if (endOfRemoveRange>_drawables.size())
{
notify(DEBUG_INFO)<<"Warning: Geode::removeDrawable(i,numDrawablesToRemove) has been passed an excessive number"<<std::endl;
notify(DEBUG_INFO)<<" of drawables to remove, trimming just to end of drawable list."<<std::endl;
OSG_DEBUG<<"Warning: Geode::removeDrawable(i,numDrawablesToRemove) has been passed an excessive number"<<std::endl;
OSG_DEBUG<<" of drawables to remove, trimming just to end of drawable list."<<std::endl;
endOfRemoveRange=_drawables.size();
}

View File

@@ -454,7 +454,7 @@ bool Geometry::addPrimitiveSet(PrimitiveSet* primitiveset)
dirtyBound();
return true;
}
notify(WARN)<<"Warning: invalid index i or primitiveset passed to osg::Geometry::addPrimitiveSet(i,primitiveset), ignoring call."<<std::endl;
OSG_WARN<<"Warning: invalid index i or primitiveset passed to osg::Geometry::addPrimitiveSet(i,primitiveset), ignoring call."<<std::endl;
return false;
}
@@ -469,7 +469,7 @@ bool Geometry::setPrimitiveSet(unsigned int i,PrimitiveSet* primitiveset)
dirtyBound();
return true;
}
notify(WARN)<<"Warning: invalid index i or primitiveset passed to osg::Geometry::setPrimitiveSet(i,primitiveset), ignoring call."<<std::endl;
OSG_WARN<<"Warning: invalid index i or primitiveset passed to osg::Geometry::setPrimitiveSet(i,primitiveset), ignoring call."<<std::endl;
return false;
}
@@ -493,7 +493,7 @@ bool Geometry::insertPrimitiveSet(unsigned int i,PrimitiveSet* primitiveset)
}
}
notify(WARN)<<"Warning: invalid index i or primitiveset passed to osg::Geometry::insertPrimitiveSet(i,primitiveset), ignoring call."<<std::endl;
OSG_WARN<<"Warning: invalid index i or primitiveset passed to osg::Geometry::insertPrimitiveSet(i,primitiveset), ignoring call."<<std::endl;
return false;
}
@@ -511,8 +511,8 @@ bool Geometry::removePrimitiveSet(unsigned int i, unsigned int numElementsToRemo
{
// asking to delete too many elements, report a warning, and delete to
// the end of the primitive list.
notify(WARN)<<"Warning: osg::Geometry::removePrimitiveSet(i,numElementsToRemove) has been asked to remove more elements than are available,"<<std::endl;
notify(WARN)<<" removing on from i to the end of the list of primitive sets."<<std::endl;
OSG_WARN<<"Warning: osg::Geometry::removePrimitiveSet(i,numElementsToRemove) has been asked to remove more elements than are available,"<<std::endl;
OSG_WARN<<" removing on from i to the end of the list of primitive sets."<<std::endl;
_primitives.erase(_primitives.begin()+i,_primitives.end());
}
@@ -520,7 +520,7 @@ bool Geometry::removePrimitiveSet(unsigned int i, unsigned int numElementsToRemo
dirtyBound();
return true;
}
notify(WARN)<<"Warning: invalid index i passed to osg::Geometry::removePrimitiveSet(i,numElementsToRemove), ignoring call."<<std::endl;
OSG_WARN<<"Warning: invalid index i passed to osg::Geometry::removePrimitiveSet(i,numElementsToRemove), ignoring call."<<std::endl;
return false;
}
@@ -746,7 +746,7 @@ void Geometry::setUseVertexBufferObjects(bool flag)
{
// flag = true;
// osg::notify(osg::NOTICE)<<"Geometry::setUseVertexBufferObjects("<<flag<<")"<<std::endl;
// OSG_NOTICE<<"Geometry::setUseVertexBufferObjects("<<flag<<")"<<std::endl;
if (_useVertexBufferObjects==flag) return;
@@ -904,7 +904,7 @@ void Geometry::compileGLObjects(RenderInfo& renderInfo) const
areFastPathsUsed();
if (useVertexArrays)
{
// osg::notify(osg::NOTICE)<<"Geometry::compileGLObjects() use VBO's "<<this<<std::endl;
// OSG_NOTICE<<"Geometry::compileGLObjects() use VBO's "<<this<<std::endl;
State& state = *renderInfo.getState();
unsigned int contextID = state.getContextID();
GLBufferObject::Extensions* extensions = GLBufferObject::getExtensions(contextID, true);
@@ -950,7 +950,7 @@ void Geometry::compileGLObjects(RenderInfo& renderInfo) const
GLBufferObject* glBufferObject = (*itr)->getOrCreateGLBufferObject(contextID);
if (glBufferObject && glBufferObject->isDirty())
{
// osg::notify(osg::NOTICE)<<"Compile buffer "<<glBufferObject<<std::endl;
// OSG_NOTICE<<"Compile buffer "<<glBufferObject<<std::endl;
glBufferObject->compileBuffer();
}
}
@@ -1294,7 +1294,7 @@ void Geometry::accept(AttributeFunctor& af)
}
else if (_vertexAttribList.size()>0)
{
osg::notify(osg::INFO)<<"Geometry::accept(AttributeFunctor& af): Using vertex attribute instead"<<std::endl;
OSG_INFO<<"Geometry::accept(AttributeFunctor& af): Using vertex attribute instead"<<std::endl;
afav.applyArray(VERTICES,_vertexAttribList[0].array.get());
}
@@ -1367,7 +1367,7 @@ void Geometry::accept(ConstAttributeFunctor& af) const
}
else if (_vertexAttribList.size()>0)
{
osg::notify(osg::INFO)<<"Geometry::accept(ConstAttributeFunctor& af): Using vertex attribute instead"<<std::endl;
OSG_INFO<<"Geometry::accept(ConstAttributeFunctor& af): Using vertex attribute instead"<<std::endl;
afav.applyArray(VERTICES,_vertexAttribList[0].array.get());
}
@@ -1394,7 +1394,7 @@ void Geometry::accept(PrimitiveFunctor& functor) const
if (!vertices && _vertexAttribList.size()>0)
{
osg::notify(osg::INFO)<<"Using vertex attribute instead"<<std::endl;
OSG_INFO<<"Using vertex attribute instead"<<std::endl;
vertices = _vertexAttribList[0].array.get();
indices = _vertexAttribList[0].indices.get();
}
@@ -1424,7 +1424,7 @@ void Geometry::accept(PrimitiveFunctor& functor) const
functor.setVertexArray(vertices->getNumElements(),static_cast<const Vec4d*>(vertices->getDataPointer()));
break;
default:
notify(WARN)<<"Warning: Geometry::accept(PrimitiveFunctor&) cannot handle Vertex Array type"<<vertices->getType()<<std::endl;
OSG_WARN<<"Warning: Geometry::accept(PrimitiveFunctor&) cannot handle Vertex Array type"<<vertices->getType()<<std::endl;
return;
}
@@ -1465,7 +1465,7 @@ void Geometry::accept(PrimitiveFunctor& functor) const
vec4dArray = static_cast<const Vec4d*>(vertices->getDataPointer());
break;
default:
notify(WARN)<<"Warning: Geometry::accept(PrimitiveFunctor&) cannot handle Vertex Array type"<<vertices->getType()<<std::endl;
OSG_WARN<<"Warning: Geometry::accept(PrimitiveFunctor&) cannot handle Vertex Array type"<<vertices->getType()<<std::endl;
return;
}
@@ -1693,7 +1693,7 @@ void Geometry::accept(PrimitiveIndexFunctor& functor) const
if (!vertices && _vertexAttribList.size()>0)
{
osg::notify(osg::INFO)<<"Geometry::accept(PrimitiveIndexFunctor& functor): Using vertex attribute instead"<<std::endl;
OSG_INFO<<"Geometry::accept(PrimitiveIndexFunctor& functor): Using vertex attribute instead"<<std::endl;
vertices = _vertexAttribList[0].array.get();
indices = _vertexAttribList[0].indices.get();
}
@@ -1721,7 +1721,7 @@ void Geometry::accept(PrimitiveIndexFunctor& functor) const
functor.setVertexArray(vertices->getNumElements(),static_cast<const Vec4d*>(vertices->getDataPointer()));
break;
default:
notify(WARN)<<"Warning: Geometry::accept(PrimitiveIndexFunctor&) cannot handle Vertex Array type"<<vertices->getType()<<std::endl;
OSG_WARN<<"Warning: Geometry::accept(PrimitiveIndexFunctor&) cannot handle Vertex Array type"<<vertices->getType()<<std::endl;
return;
}
@@ -1857,11 +1857,11 @@ unsigned int _computeNumberOfPrimitives(const osg::Geometry& geom)
unsigned int primLength;
switch(mode)
{
case(GL_POINTS): primLength=1; osg::notify(osg::INFO)<<"prim=GL_POINTS"<<std::endl; break;
case(GL_LINES): primLength=2; osg::notify(osg::INFO)<<"prim=GL_LINES"<<std::endl; break;
case(GL_TRIANGLES): primLength=3; osg::notify(osg::INFO)<<"prim=GL_TRIANGLES"<<std::endl; break;
case(GL_QUADS): primLength=4; osg::notify(osg::INFO)<<"prim=GL_QUADS"<<std::endl; break;
default: primLength=0; osg::notify(osg::INFO)<<"prim="<<std::hex<<mode<<std::dec<<std::endl; break; // compute later when =0.
case(GL_POINTS): primLength=1; OSG_INFO<<"prim=GL_POINTS"<<std::endl; break;
case(GL_LINES): primLength=2; OSG_INFO<<"prim=GL_LINES"<<std::endl; break;
case(GL_TRIANGLES): primLength=3; OSG_INFO<<"prim=GL_TRIANGLES"<<std::endl; break;
case(GL_QUADS): primLength=4; OSG_INFO<<"prim=GL_QUADS"<<std::endl; break;
default: primLength=0; OSG_INFO<<"prim="<<std::hex<<mode<<std::dec<<std::endl; break; // compute later when =0.
}
// draw primitives by the more flexible "slow" path,
@@ -1883,8 +1883,8 @@ unsigned int _computeNumberOfPrimitives(const osg::Geometry& geom)
}
default:
{
if (primLength==0) { totalNumberOfPrimitives += 1; osg::notify(osg::INFO)<<" totalNumberOfPrimitives="<<totalNumberOfPrimitives<<std::endl;}
else { totalNumberOfPrimitives += primitiveset->getNumIndices()/primLength; osg::notify(osg::INFO)<<" primitiveset->getNumIndices()="<<primitiveset->getNumIndices()<<" totalNumberOfPrimitives="<<totalNumberOfPrimitives<<std::endl; }
if (primLength==0) { totalNumberOfPrimitives += 1; OSG_INFO<<" totalNumberOfPrimitives="<<totalNumberOfPrimitives<<std::endl;}
else { totalNumberOfPrimitives += primitiveset->getNumIndices()/primLength; OSG_INFO<<" primitiveset->getNumIndices()="<<primitiveset->getNumIndices()<<" totalNumberOfPrimitives="<<totalNumberOfPrimitives<<std::endl; }
}
}

View File

@@ -55,13 +55,13 @@ void GraphicsContext::setWindowingSystemInterface(WindowingSystemInterface* call
{
ref_ptr<GraphicsContext::WindowingSystemInterface> &wsref = windowingSystemInterfaceRef();
wsref = callback;
OSG_NOTIFY(osg::INFO)<<"GraphicsContext::setWindowingSystemInterface() "<<wsref.get()<<"\t"<<&wsref<<std::endl;
OSG_INFO<<"GraphicsContext::setWindowingSystemInterface() "<<wsref.get()<<"\t"<<&wsref<<std::endl;
}
GraphicsContext::WindowingSystemInterface* GraphicsContext::getWindowingSystemInterface()
{
ref_ptr<GraphicsContext::WindowingSystemInterface> &wsref = windowingSystemInterfaceRef();
OSG_NOTIFY(osg::INFO)<<"GraphicsContext::getWindowingSystemInterface() "<<wsref.get()<<"\t"<<&wsref<<std::endl;
OSG_INFO<<"GraphicsContext::getWindowingSystemInterface() "<<wsref.get()<<"\t"<<&wsref<<std::endl;
return wsref.get();
}
@@ -148,9 +148,9 @@ void GraphicsContext::ScreenIdentifier::setScreenIdentifier(const std::string& d
}
#if 0
OSG_NOTIFY(osg::NOTICE)<<" hostName ["<<hostName<<"]"<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" displayNum "<<displayNum<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" screenNum "<<screenNum<<std::endl;
OSG_NOTICE<<" hostName ["<<hostName<<"]"<<std::endl;
OSG_NOTICE<<" displayNum "<<displayNum<<std::endl;
OSG_NOTICE<<" screenNum "<<screenNum<<std::endl;
#endif
}
@@ -226,11 +226,11 @@ public:
{
--_numContexts;
OSG_NOTIFY(osg::INFO)<<"decrementUsageCount()"<<_numContexts<<std::endl;
OSG_INFO<<"decrementUsageCount()"<<_numContexts<<std::endl;
if (_numContexts <= 1 && _compileContext.valid())
{
OSG_NOTIFY(osg::INFO)<<"resetting compileContext "<<_compileContext.get()<<" refCount "<<_compileContext->referenceCount()<<std::endl;
OSG_INFO<<"resetting compileContext "<<_compileContext.get()<<" refCount "<<_compileContext->referenceCount()<<std::endl;
_compileContext = 0;
}
@@ -261,7 +261,7 @@ unsigned int GraphicsContext::createNewContextID()
// reuse contextID;
itr->second._numContexts = 1;
OSG_NOTIFY(osg::INFO)<<"GraphicsContext::createNewContextID() reusing contextID="<<itr->first<<std::endl;
OSG_INFO<<"GraphicsContext::createNewContextID() reusing contextID="<<itr->first<<std::endl;
return itr->first;
}
@@ -270,8 +270,8 @@ unsigned int GraphicsContext::createNewContextID()
unsigned int contextID = s_contextIDMap.size();
s_contextIDMap[contextID]._numContexts = 1;
OSG_NOTIFY(osg::INFO)<<"GraphicsContext::createNewContextID() creating contextID="<<contextID<<std::endl;
OSG_NOTIFY(osg::INFO)<<"Updating the MaxNumberOfGraphicsContexts to "<<contextID+1<<std::endl;
OSG_INFO<<"GraphicsContext::createNewContextID() creating contextID="<<contextID<<std::endl;
OSG_INFO<<"Updating the MaxNumberOfGraphicsContexts to "<<contextID+1<<std::endl;
// update the the maximum number of graphics contexts,
// to ensure that texture objects and display buffers are configured to the correct size.
@@ -298,7 +298,7 @@ void GraphicsContext::incrementContextIDUsageCount(unsigned int contextID)
{
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(s_contextIDMapMutex);
OSG_NOTIFY(osg::INFO)<<"GraphicsContext::incrementContextIDUsageCount("<<contextID<<") to "<<s_contextIDMap[contextID]._numContexts<<std::endl;
OSG_INFO<<"GraphicsContext::incrementContextIDUsageCount("<<contextID<<") to "<<s_contextIDMap[contextID]._numContexts<<std::endl;
s_contextIDMap[contextID].incrementUsageCount();
}
@@ -314,17 +314,17 @@ void GraphicsContext::decrementContextIDUsageCount(unsigned int contextID)
}
else
{
OSG_NOTIFY(osg::NOTICE)<<"Warning: decrementContextIDUsageCount("<<contextID<<") called on expired contextID."<<std::endl;
OSG_NOTICE<<"Warning: decrementContextIDUsageCount("<<contextID<<") called on expired contextID."<<std::endl;
}
OSG_NOTIFY(osg::INFO)<<"GraphicsContext::decrementContextIDUsageCount("<<contextID<<") to "<<s_contextIDMap[contextID]._numContexts<<std::endl;
OSG_INFO<<"GraphicsContext::decrementContextIDUsageCount("<<contextID<<") to "<<s_contextIDMap[contextID]._numContexts<<std::endl;
}
void GraphicsContext::registerGraphicsContext(GraphicsContext* gc)
{
OSG_NOTIFY(osg::INFO)<<"GraphicsContext::registerGraphicsContext "<<gc<<std::endl;
OSG_INFO<<"GraphicsContext::registerGraphicsContext "<<gc<<std::endl;
if (!gc) return;
@@ -338,7 +338,7 @@ void GraphicsContext::registerGraphicsContext(GraphicsContext* gc)
void GraphicsContext::unregisterGraphicsContext(GraphicsContext* gc)
{
OSG_NOTIFY(osg::INFO)<<"GraphicsContext::unregisterGraphicsContext "<<gc<<std::endl;
OSG_INFO<<"GraphicsContext::unregisterGraphicsContext "<<gc<<std::endl;
if (!gc) return;
@@ -350,7 +350,7 @@ void GraphicsContext::unregisterGraphicsContext(GraphicsContext* gc)
GraphicsContext::GraphicsContexts GraphicsContext::getAllRegisteredGraphicsContexts()
{
OSG_NOTIFY(osg::INFO)<<"GraphicsContext::getAllRegisteredGraphicsContexts s_registeredContexts.size()="<<s_registeredContexts.size()<<std::endl;
OSG_INFO<<"GraphicsContext::getAllRegisteredGraphicsContexts s_registeredContexts.size()="<<s_registeredContexts.size()<<std::endl;
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(s_contextIDMapMutex);
return s_registeredContexts;
}
@@ -368,14 +368,14 @@ GraphicsContext::GraphicsContexts GraphicsContext::getRegisteredGraphicsContexts
if (gc->getState() && gc->getState()->getContextID()==contextID) contexts.push_back(gc);
}
OSG_NOTIFY(osg::INFO)<<"GraphicsContext::getRegisteredGraphicsContexts "<<contextID<<" contexts.size()="<<contexts.size()<<std::endl;
OSG_INFO<<"GraphicsContext::getRegisteredGraphicsContexts "<<contextID<<" contexts.size()="<<contexts.size()<<std::endl;
return contexts;
}
GraphicsContext* GraphicsContext::getOrCreateCompileContext(unsigned int contextID)
{
OSG_NOTIFY(osg::NOTICE)<<"GraphicsContext::createCompileContext."<<std::endl;
OSG_NOTICE<<"GraphicsContext::createCompileContext."<<std::endl;
{
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(s_contextIDMapMutex);
@@ -407,7 +407,7 @@ GraphicsContext* GraphicsContext::getOrCreateCompileContext(unsigned int context
{
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(s_contextIDMapMutex);
s_contextIDMap[contextID]._compileContext = gc;
OSG_NOTIFY(osg::NOTICE)<<" succeeded GraphicsContext::createCompileContext."<<std::endl;
OSG_NOTICE<<" succeeded GraphicsContext::createCompileContext."<<std::endl;
return gc.release();
}
else
@@ -425,7 +425,7 @@ void GraphicsContext::setCompileContext(unsigned int contextID, GraphicsContext*
GraphicsContext* GraphicsContext::getCompileContext(unsigned int contextID)
{
// OSG_NOTIFY(osg::NOTICE)<<"GraphicsContext::getCompileContext "<<contextID<<std::endl;
// OSG_NOTICE<<"GraphicsContext::getCompileContext "<<contextID<<std::endl;
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(s_contextIDMapMutex);
ContextIDMap::iterator itr = s_contextIDMap.find(contextID);
if (itr != s_contextIDMap.end()) return itr->second._compileContext.get();
@@ -496,7 +496,7 @@ bool GraphicsContext::realize()
void GraphicsContext::close(bool callCloseImplementation)
{
OSG_NOTIFY(osg::INFO)<<"close("<<callCloseImplementation<<")"<<this<<std::endl;
OSG_INFO<<"close("<<callCloseImplementation<<")"<<this<<std::endl;
// switch off the graphics thread...
setGraphicsThread(0);
@@ -518,7 +518,7 @@ void GraphicsContext::close(bool callCloseImplementation)
Camera* camera = (*itr);
if (camera)
{
OSG_NOTIFY(osg::INFO)<<"Releasing GL objects for Camera="<<camera<<" _state="<<_state.get()<<std::endl;
OSG_INFO<<"Releasing GL objects for Camera="<<camera<<" _state="<<_state.get()<<std::endl;
camera->releaseGLObjects(_state.get());
}
}
@@ -526,16 +526,16 @@ void GraphicsContext::close(bool callCloseImplementation)
if (callCloseImplementation && _state.valid() && isRealized())
{
OSG_NOTIFY(osg::INFO)<<"Closing still viable window "<<sharedContextExists<<" _state->getContextID()="<<_state->getContextID()<<std::endl;
OSG_INFO<<"Closing still viable window "<<sharedContextExists<<" _state->getContextID()="<<_state->getContextID()<<std::endl;
if (makeCurrent())
{
OSG_NOTIFY(osg::INFO)<<"Doing delete of GL objects"<<std::endl;
OSG_INFO<<"Doing delete of GL objects"<<std::endl;
osg::deleteAllGLObjects(_state->getContextID());
OSG_NOTIFY(osg::INFO)<<"Done delete of GL objects"<<std::endl;
OSG_INFO<<"Done delete of GL objects"<<std::endl;
_state->reset();
@@ -543,7 +543,7 @@ void GraphicsContext::close(bool callCloseImplementation)
}
else
{
OSG_NOTIFY(osg::INFO)<<"makeCurrent did not succeed, could not do flush/deletion of OpenGL objects."<<std::endl;
OSG_INFO<<"makeCurrent did not succeed, could not do flush/deletion of OpenGL objects."<<std::endl;
}
}
@@ -555,7 +555,7 @@ void GraphicsContext::close(bool callCloseImplementation)
// does not work.
if (_state.valid())
{
OSG_NOTIFY(osg::INFO)<<"Doing discard of deleted OpenGL objects."<<std::endl;
OSG_INFO<<"Doing discard of deleted OpenGL objects."<<std::endl;
osg::discardAllGLObjects(_state->getContextID());
}
@@ -661,7 +661,7 @@ void GraphicsContext::setGraphicsThread(GraphicsThread* gt)
void GraphicsContext::add(Operation* operation)
{
OSG_NOTIFY(osg::INFO)<<"Doing add"<<std::endl;
OSG_INFO<<"Doing add"<<std::endl;
// acquire the lock on the operations queue to prevent anyone else for modifying it at the same time
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_operationsMutex);
@@ -674,7 +674,7 @@ void GraphicsContext::add(Operation* operation)
void GraphicsContext::remove(Operation* operation)
{
OSG_NOTIFY(osg::INFO)<<"Doing remove operation"<<std::endl;
OSG_INFO<<"Doing remove operation"<<std::endl;
// acquire the lock on the operations queue to prevent anyone else for modifying it at the same time
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_operationsMutex);
@@ -694,7 +694,7 @@ void GraphicsContext::remove(Operation* operation)
void GraphicsContext::remove(const std::string& name)
{
OSG_NOTIFY(osg::INFO)<<"Doing remove named operation"<<std::endl;
OSG_INFO<<"Doing remove named operation"<<std::endl;
// acquire the lock on the operations queue to prevent anyone else for modifying it at the same time
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_operationsMutex);
@@ -715,7 +715,7 @@ void GraphicsContext::remove(const std::string& name)
void GraphicsContext::removeAllOperations()
{
OSG_NOTIFY(osg::INFO)<<"Doing remove all operations"<<std::endl;
OSG_INFO<<"Doing remove all operations"<<std::endl;
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_operationsMutex);
_operations.clear();
@@ -775,7 +775,7 @@ void GraphicsContext::runOperations()
if (_currentOperation.valid())
{
// OSG_NOTIFY(osg::INFO)<<"Doing op "<<_currentOperation->getName()<<" "<<this<<std::endl;
// OSG_INFO<<"Doing op "<<_currentOperation->getName()<<" "<<this<<std::endl;
// call the graphics operation.
(*_currentOperation)(this);

View File

@@ -76,7 +76,7 @@ bool Group::insertChild( unsigned int index, Node *child )
#if ENSURE_CHILD_IS_UNIQUE
if (containsNode(child))
{
notify(WARN)<<"Adding non unique child to osg::Group, ignoring call"<<std::endl;
OSG_WARN<<"Adding non unique child to osg::Group, ignoring call"<<std::endl;
return false;
}
#endif
@@ -151,8 +151,8 @@ bool Group::removeChildren(unsigned int pos,unsigned int numChildrenToRemove)
unsigned int endOfRemoveRange = pos+numChildrenToRemove;
if (endOfRemoveRange>_children.size())
{
notify(DEBUG_INFO)<<"Warning: Group::removeChild(i,numChildrenToRemove) has been passed an excessive number"<<std::endl;
notify(DEBUG_INFO)<<" of chilren to remove, trimming just to end of child list."<<std::endl;
OSG_DEBUG<<"Warning: Group::removeChild(i,numChildrenToRemove) has been passed an excessive number"<<std::endl;
OSG_DEBUG<<" of chilren to remove, trimming just to end of child list."<<std::endl;
endOfRemoveRange=_children.size();
}

View File

@@ -67,7 +67,7 @@ void Image::UpdateCallback::operator () (osg::StateAttribute* attr, osg::NodeVis
{
osg::Texture* texture = attr ? attr->asTexture() : 0;
// osg::notify(osg::NOTICE)<<"ImageSequence::UpdateCallback::"<<texture<<std::endl;
// OSG_NOTICE<<"ImageSequence::UpdateCallback::"<<texture<<std::endl;
if (texture)
{
for(unsigned int i=0; i<texture->getNumImages(); ++i)
@@ -239,7 +239,7 @@ GLenum Image::computePixelFormat(GLenum format)
case(GL_INTENSITY8UI_EXT):
case(GL_INTENSITY16UI_EXT):
case(GL_INTENSITY32UI_EXT):
notify(WARN)<<"Image::computePixelFormat("<<std::hex<<format<<std::dec<<") intensity pixel format is not correctly specified, so assume GL_LUMINANCE_INTEGER."<<std::endl;
OSG_WARN<<"Image::computePixelFormat("<<std::hex<<format<<std::dec<<") intensity pixel format is not correctly specified, so assume GL_LUMINANCE_INTEGER."<<std::endl;
return GL_LUMINANCE_INTEGER_EXT;
case(GL_LUMINANCE_ALPHA8I_EXT):
case(GL_LUMINANCE_ALPHA16I_EXT):
@@ -318,7 +318,7 @@ GLenum Image::computeFormatDataType(GLenum pixelFormat)
default:
{
notify(WARN)<<"error computeFormatType = "<<std::hex<<pixelFormat<<std::dec<<std::endl;
OSG_WARN<<"error computeFormatType = "<<std::hex<<pixelFormat<<std::dec<<std::endl;
return 0;
}
}
@@ -420,7 +420,7 @@ unsigned int Image::computeNumComponents(GLenum pixelFormat)
default:
{
notify(WARN)<<"error pixelFormat = "<<std::hex<<pixelFormat<<std::dec<<std::endl;
OSG_WARN<<"error pixelFormat = "<<std::hex<<pixelFormat<<std::dec<<std::endl;
return 0;
}
}
@@ -457,7 +457,7 @@ unsigned int Image::computePixelSizeInBits(GLenum format,GLenum type)
case(GL_COMPRESSED_INTENSITY):
case(GL_COMPRESSED_RGB):
case(GL_COMPRESSED_RGBA):
notify(WARN)<<"Image::computePixelSizeInBits(format,type) : cannot compute correct size of compressed format ("<<format<<") returning 0."<<std::endl;
OSG_WARN<<"Image::computePixelSizeInBits(format,type) : cannot compute correct size of compressed format ("<<format<<") returning 0."<<std::endl;
return 0;
default: break;
}
@@ -514,7 +514,7 @@ unsigned int Image::computePixelSizeInBits(GLenum format,GLenum type)
case(GL_UNSIGNED_INT_2_10_10_10_REV): return 32;
default:
{
notify(WARN)<<"error type = "<<type<<std::endl;
OSG_WARN<<"error type = "<<type<<std::endl;
return 0;
}
}
@@ -526,7 +526,7 @@ unsigned int Image::computeRowWidthInBytes(int width,GLenum pixelFormat,GLenum t
unsigned int pixelSize = computePixelSizeInBits(pixelFormat,type);
int widthInBits = width*pixelSize;
int packingInBits = packing*8;
//notify(INFO) << "width="<<width<<" pixelSize="<<pixelSize<<" width in bit="<<widthInBits<<" packingInBits="<<packingInBits<<" widthInBits%packingInBits="<<widthInBits%packingInBits<<std::endl;
//OSG_INFO << "width="<<width<<" pixelSize="<<pixelSize<<" width in bit="<<widthInBits<<" packingInBits="<<packingInBits<<" widthInBits%packingInBits="<<widthInBits%packingInBits<<std::endl;
return (widthInBits/packingInBits + ((widthInBits%packingInBits)?1:0))*packing;
}
@@ -591,7 +591,7 @@ unsigned int Image::getTotalSizeInBytesIncludingMipmaps() const
default: break;
}
// notify(INFO)<<"sizeOfLastMipMap="<<sizeOfLastMipMap<<"\ts="<<s<<"\tt="<<t<<"\tr"<<r<<std::endl;
// OSG_INFO<<"sizeOfLastMipMap="<<sizeOfLastMipMap<<"\ts="<<s<<"\tt="<<t<<"\tr"<<r<<std::endl;
return maxValue+sizeOfLastMipMap;
@@ -617,7 +617,7 @@ void Image::setPixelFormat(GLenum pixelFormat)
}
else
{
notify(WARN)<<"Image::setPixelFormat(..) - warning, attempt to reset the pixel format with a different number of components."<<std::endl;
OSG_WARN<<"Image::setPixelFormat(..) - warning, attempt to reset the pixel format with a different number of components."<<std::endl;
}
}
@@ -632,7 +632,7 @@ void Image::setDataType(GLenum dataType)
}
else
{
notify(WARN)<<"Image::setDataType(..) - warning, attempt to reset the data type not permitted."<<std::endl;
OSG_WARN<<"Image::setDataType(..) - warning, attempt to reset the data type not permitted."<<std::endl;
}
}
@@ -728,7 +728,7 @@ void Image::readPixels(int x,int y,int width,int height,
void Image::readImageFromCurrentTexture(unsigned int contextID, bool copyMipMapsIfAvailable, GLenum type)
{
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE)
// osg::notify(osg::NOTICE)<<"Image::readImageFromCurrentTexture()"<<std::endl;
// OSG_NOTICE<<"Image::readImageFromCurrentTexture()"<<std::endl;
const osg::Texture::Extensions* extensions = osg::Texture::getExtensions(contextID,true);
const osg::Texture3D::Extensions* extensions3D = osg::Texture3D::getExtensions(contextID,true);
@@ -764,7 +764,7 @@ void Image::readImageFromCurrentTexture(unsigned int contextID, bool copyMipMaps
glGetTexLevelParameteriv(textureMode, numMipMaps, GL_TEXTURE_WIDTH, &width);
glGetTexLevelParameteriv(textureMode, numMipMaps, GL_TEXTURE_HEIGHT, &height);
glGetTexLevelParameteriv(textureMode, numMipMaps, GL_TEXTURE_DEPTH, &depth);
// osg::notify(osg::NOTICE)<<" numMipMaps="<<numMipMaps<<" width="<<width<<" height="<<height<<" depth="<<depth<<std::endl;
// OSG_NOTICE<<" numMipMaps="<<numMipMaps<<" width="<<width<<" height="<<height<<" depth="<<depth<<std::endl;
if (width==0 || height==0 || depth==0) break;
}
}
@@ -773,7 +773,7 @@ void Image::readImageFromCurrentTexture(unsigned int contextID, bool copyMipMaps
numMipMaps = 1;
}
// osg::notify(osg::NOTICE)<<"Image::readImageFromCurrentTexture() : numMipMaps = "<<numMipMaps<<std::endl;
// OSG_NOTICE<<"Image::readImageFromCurrentTexture() : numMipMaps = "<<numMipMaps<<std::endl;
GLint compressed = 0;
@@ -824,7 +824,7 @@ void Image::readImageFromCurrentTexture(unsigned int contextID, bool copyMipMaps
unsigned char* data = new unsigned char[total_size];
if (!data)
{
osg::notify(osg::WARN)<<"Warning: Image::readImageFromCurrentTexture(..) out of memory, now image read."<<std::endl;
OSG_WARN<<"Warning: Image::readImageFromCurrentTexture(..) out of memory, now image read."<<std::endl;
return;
}
@@ -886,7 +886,7 @@ void Image::readImageFromCurrentTexture(unsigned int contextID, bool copyMipMaps
unsigned char* data = new unsigned char[total_size];
if (!data)
{
osg::notify(osg::WARN)<<"Warning: Image::readImageFromCurrentTexture(..) out of memory, now image read."<<std::endl;
OSG_WARN<<"Warning: Image::readImageFromCurrentTexture(..) out of memory, now image read."<<std::endl;
return;
}
@@ -916,7 +916,7 @@ void Image::readImageFromCurrentTexture(unsigned int contextID, bool copyMipMaps
dirty();
}
#else
osg::notify(osg::NOTICE)<<"Warning: Image::readImageFromCurrentTexture() not supported."<<std::endl;
OSG_NOTICE<<"Warning: Image::readImageFromCurrentTexture() not supported."<<std::endl;
#endif
}
@@ -927,13 +927,13 @@ void Image::scaleImage(int s,int t,int r, GLenum newDataType)
if (_data==NULL)
{
notify(WARN) << "Error Image::scaleImage() do not succeed : cannot scale NULL image."<<std::endl;
OSG_WARN << "Error Image::scaleImage() do not succeed : cannot scale NULL image."<<std::endl;
return;
}
if (_r!=1 || r!=1)
{
notify(WARN) << "Error Image::scaleImage() do not succeed : scaling of volumes not implemented."<<std::endl;
OSG_WARN << "Error Image::scaleImage() do not succeed : scaling of volumes not implemented."<<std::endl;
return;
}
@@ -946,7 +946,7 @@ void Image::scaleImage(int s,int t,int r, GLenum newDataType)
if (!newData)
{
// should we throw an exception??? Just return for time being.
notify(FATAL) << "Error Image::scaleImage() do not succeed : out of memory."<<newTotalSize<<std::endl;
OSG_FATAL << "Error Image::scaleImage() do not succeed : out of memory."<<newTotalSize<<std::endl;
return;
}
@@ -976,12 +976,12 @@ void Image::scaleImage(int s,int t,int r, GLenum newDataType)
{
delete [] newData;
notify(WARN) << "Error Image::scaleImage() did not succeed : errorString = "<< gluErrorString((GLenum)status) << ". The rendering context may be invalid." << std::endl;
OSG_WARN << "Error Image::scaleImage() did not succeed : errorString = "<< gluErrorString((GLenum)status) << ". The rendering context may be invalid." << std::endl;
}
dirty();
#else
osg::notify(osg::NOTICE)<<"Warning: Image::scaleImage(int s,int t,int r, GLenum newDataType) not supported."<<std::endl;
OSG_NOTICE<<"Warning: Image::scaleImage(int s,int t,int r, GLenum newDataType) not supported."<<std::endl;
#endif
}
@@ -991,13 +991,13 @@ void Image::copySubImage(int s_offset, int t_offset, int r_offset, const osg::Im
if (!source) return;
if (s_offset<0 || t_offset<0 || r_offset<0)
{
notify(WARN)<<"Warning: negative offsets passed to Image::copySubImage(..) not supported, operation ignored."<<std::endl;
OSG_WARN<<"Warning: negative offsets passed to Image::copySubImage(..) not supported, operation ignored."<<std::endl;
return;
}
if (!_data)
{
notify(INFO)<<"allocating image"<<endl;
OSG_INFO<<"allocating image"<<endl;
allocateImage(s_offset+source->s(),t_offset+source->t(),r_offset+source->r(),
source->getPixelFormat(),source->getDataType(),
source->getPacking());
@@ -1005,14 +1005,14 @@ void Image::copySubImage(int s_offset, int t_offset, int r_offset, const osg::Im
if (s_offset>=_s || t_offset>=_t || r_offset>=_r)
{
notify(WARN)<<"Warning: offsets passed to Image::copySubImage(..) outside destination image, operation ignored."<<std::endl;
OSG_WARN<<"Warning: offsets passed to Image::copySubImage(..) outside destination image, operation ignored."<<std::endl;
return;
}
if (_pixelFormat != source->getPixelFormat())
{
notify(WARN)<<"Warning: image with an incompatible pixel formats passed to Image::copySubImage(..), operation ignored."<<std::endl;
OSG_WARN<<"Warning: image with an incompatible pixel formats passed to Image::copySubImage(..), operation ignored."<<std::endl;
return;
}
@@ -1037,10 +1037,10 @@ void Image::copySubImage(int s_offset, int t_offset, int r_offset, const osg::Im
if (status!=0)
{
notify(WARN) << "Error Image::scaleImage() did not succeed : errorString = "<< gluErrorString((GLenum)status) << ". The rendering context may be invalid." << std::endl;
OSG_WARN << "Error Image::scaleImage() did not succeed : errorString = "<< gluErrorString((GLenum)status) << ". The rendering context may be invalid." << std::endl;
}
#else
osg::notify(osg::NOTICE)<<"Warning: Image::copySubImage(int, int, int, const osg::Image*)) not supported."<<std::endl;
OSG_NOTICE<<"Warning: Image::copySubImage(int, int, int, const osg::Image*)) not supported."<<std::endl;
#endif
}
@@ -1048,7 +1048,7 @@ void Image::flipHorizontal()
{
if (_data==NULL)
{
notify(WARN) << "Error Image::flipHorizontal() did not succeed : cannot flip NULL image."<<std::endl;
OSG_WARN << "Error Image::flipHorizontal() did not succeed : cannot flip NULL image."<<std::endl;
return;
}
@@ -1079,7 +1079,7 @@ void Image::flipHorizontal()
}
else
{
notify(WARN) << "Error Image::flipHorizontal() did not succeed : cannot flip mipmapped image."<<std::endl;
OSG_WARN << "Error Image::flipHorizontal() did not succeed : cannot flip mipmapped image."<<std::endl;
return;
}
@@ -1105,13 +1105,13 @@ void Image::flipVertical()
{
if (_data==NULL)
{
notify(WARN) << "Error Image::flipVertical() do not succeed : cannot flip NULL image."<<std::endl;
OSG_WARN << "Error Image::flipVertical() do not succeed : cannot flip NULL image."<<std::endl;
return;
}
if (!_mipmapData.empty() && _r>1)
{
notify(WARN) << "Error Image::flipVertical() do not succeed : flipping of mipmap 3d textures not yet supported."<<std::endl;
OSG_WARN << "Error Image::flipVertical() do not succeed : flipping of mipmap 3d textures not yet supported."<<std::endl;
return;
}
@@ -1182,8 +1182,8 @@ void Image::ensureValidSizeForTexturing(GLint maxTextureSize)
if (new_s!=_s || new_t!=_t)
{
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;
if (!_fileName.empty()) { OSG_NOTICE << "Scaling image '"<<_fileName<<"' from ("<<_s<<","<<_t<<") to ("<<new_s<<","<<new_t<<")"<<std::endl; }
else { OSG_NOTICE << "Scaling image from ("<<_s<<","<<_t<<") to ("<<new_s<<","<<new_t<<")"<<std::endl; }
scaleImage(new_s,new_t,_r);
}
@@ -1450,6 +1450,6 @@ Vec4 Image::getColor(const Vec3& texcoord) const
int s = int(texcoord.x()*float(_s-1)) % _s;
int t = int(texcoord.y()*float(_t-1)) % _t;
int r = int(texcoord.z()*float(_r-1)) % _r;
//osg::notify(osg::NOTICE)<<"getColor("<<texcoord<<")="<<getColor(s,t,r)<<std::endl;
//OSG_NOTICE<<"getColor("<<texcoord<<")="<<getColor(s,t,r)<<std::endl;
return getColor(s,t,r);
}

View File

@@ -86,7 +86,7 @@ void ImageSequence::setLength(double length)
{
if (length<=0.0)
{
osg::notify(osg::NOTICE)<<"ImageSequence::setLength("<<length<<") invalid length value, must be greater than 0."<<std::endl;
OSG_NOTICE<<"ImageSequence::setLength("<<length<<") invalid length value, must be greater than 0."<<std::endl;
return;
}
@@ -126,7 +126,7 @@ void ImageSequence::setImage(unsigned int pos, osg::Image* image)
{
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex);
osg::notify(osg::INFO)<<"ImageSequence::setImage("<<pos<<","<<image->getFileName()<<")"<<std::endl;
OSG_INFO<<"ImageSequence::setImage("<<pos<<","<<image->getFileName()<<")"<<std::endl;
if (pos>=_images.size()) _images.resize(pos+1);
@@ -155,7 +155,7 @@ void ImageSequence::addImage(osg::Image* image)
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex);
// osg::notify(osg::NOTICE)<<"merging image in order expected : "<<image->getFileName()<<std::endl;
// OSG_NOTICE<<"merging image in order expected : "<<image->getFileName()<<std::endl;
_images.push_back(image);
computeTimePerImage();
@@ -168,7 +168,7 @@ void ImageSequence::addImage(osg::Image* image)
void ImageSequence::setImageToChild(const osg::Image* image)
{
// osg::notify(osg::NOTICE)<<"setImageToChild("<<image<<")"<<std::endl;
// OSG_NOTICE<<"setImageToChild("<<image<<")"<<std::endl;
if (image==0) return;
@@ -208,7 +208,7 @@ void ImageSequence::update(osg::NodeVisitor* nv)
osg::NodeVisitor::ImageRequestHandler* irh = nv->getImageRequestHandler();
const osg::FrameStamp* fs = nv->getFrameStamp();
// osg::notify(osg::NOTICE)<<"ImageSequence::update("<<fs<<", "<<irh<<")"<<std::endl;
// OSG_NOTICE<<"ImageSequence::update("<<fs<<", "<<irh<<")"<<std::endl;
if (_referenceTime == DBL_MAX)
{
@@ -280,7 +280,7 @@ void ImageSequence::update(osg::NodeVisitor* nv)
}
int index = int(time/_timePerImage);
// osg::notify(osg::NOTICE)<<"time= "<<time<<" _timePerImage="<<_timePerImage<<" index="<<index<<" _length="<<_length<<std::endl;
// OSG_NOTICE<<"time= "<<time<<" _timePerImage="<<_timePerImage<<" index="<<index<<" _length="<<_length<<std::endl;
if (index>=int(_images.size())) index = int(_images.size())-1;
@@ -297,7 +297,7 @@ void ImageSequence::update(osg::NodeVisitor* nv)
if (index>=0)
{
// osg::notify(osg::NOTICE)<<"at time "<<time<<" setting child = "<<index<<std::endl;
// OSG_NOTICE<<"at time "<<time<<" setting child = "<<index<<std::endl;
if (_previousAppliedImageIndex!=index)
{
@@ -315,7 +315,7 @@ void ImageSequence::update(osg::NodeVisitor* nv)
}
}
// osg::notify(osg::NOTICE)<<"time = "<<time<<std::endl;
// OSG_NOTICE<<"time = "<<time<<std::endl;
if (irh)
{

View File

@@ -201,25 +201,25 @@ bool copyImage(const osg::Image* srcImage, int src_s, int src_t, int src_r, int
{
if ((src_s+width) > (dest_s + destImage->s()))
{
osg::notify(osg::NOTICE)<<"copyImage("<<srcImage<<", "<<src_s<<", "<< src_t<<", "<<src_r<<", "<<width<<", "<<height<<", "<<depth<<std::endl;
osg::notify(osg::NOTICE)<<" "<<destImage<<", "<<dest_s<<", "<< dest_t<<", "<<dest_r<<", "<<doRescale<<")"<<std::endl;
osg::notify(osg::NOTICE)<<" input width too large."<<std::endl;
OSG_NOTICE<<"copyImage("<<srcImage<<", "<<src_s<<", "<< src_t<<", "<<src_r<<", "<<width<<", "<<height<<", "<<depth<<std::endl;
OSG_NOTICE<<" "<<destImage<<", "<<dest_s<<", "<< dest_t<<", "<<dest_r<<", "<<doRescale<<")"<<std::endl;
OSG_NOTICE<<" input width too large."<<std::endl;
return false;
}
if ((src_t+height) > (dest_t + destImage->t()))
{
osg::notify(osg::NOTICE)<<"copyImage("<<srcImage<<", "<<src_s<<", "<< src_t<<", "<<src_r<<", "<<width<<", "<<height<<", "<<depth<<std::endl;
osg::notify(osg::NOTICE)<<" "<<destImage<<", "<<dest_s<<", "<< dest_t<<", "<<dest_r<<", "<<doRescale<<")"<<std::endl;
osg::notify(osg::NOTICE)<<" input height too large."<<std::endl;
OSG_NOTICE<<"copyImage("<<srcImage<<", "<<src_s<<", "<< src_t<<", "<<src_r<<", "<<width<<", "<<height<<", "<<depth<<std::endl;
OSG_NOTICE<<" "<<destImage<<", "<<dest_s<<", "<< dest_t<<", "<<dest_r<<", "<<doRescale<<")"<<std::endl;
OSG_NOTICE<<" input height too large."<<std::endl;
return false;
}
if ((src_r+depth) > (dest_r + destImage->r()))
{
osg::notify(osg::NOTICE)<<"copyImage("<<srcImage<<", "<<src_s<<", "<< src_t<<", "<<src_r<<", "<<width<<", "<<height<<", "<<depth<<std::endl;
osg::notify(osg::NOTICE)<<" "<<destImage<<", "<<dest_s<<", "<< dest_t<<", "<<dest_r<<", "<<doRescale<<")"<<std::endl;
osg::notify(osg::NOTICE)<<" input depth too large."<<std::endl;
OSG_NOTICE<<"copyImage("<<srcImage<<", "<<src_s<<", "<< src_t<<", "<<src_r<<", "<<width<<", "<<height<<", "<<depth<<std::endl;
OSG_NOTICE<<" "<<destImage<<", "<<dest_s<<", "<< dest_t<<", "<<dest_r<<", "<<doRescale<<")"<<std::endl;
OSG_NOTICE<<" input depth too large."<<std::endl;
return false;
}
@@ -250,12 +250,12 @@ bool copyImage(const osg::Image* srcImage, int src_s, int src_t, int src_r, int
if (srcImage->getPixelFormat() == destImage->getPixelFormat())
{
//osg::notify(osg::NOTICE)<<"copyImage("<<srcImage<<", "<<src_s<<", "<< src_t<<", "<<src_r<<", "<<width<<", "<<height<<", "<<depth<<std::endl;
//osg::notify(osg::NOTICE)<<" "<<destImage<<", "<<dest_s<<", "<< dest_t<<", "<<dest_r<<", "<<doRescale<<")"<<std::endl;
//OSG_NOTICE<<"copyImage("<<srcImage<<", "<<src_s<<", "<< src_t<<", "<<src_r<<", "<<width<<", "<<height<<", "<<depth<<std::endl;
//OSG_NOTICE<<" "<<destImage<<", "<<dest_s<<", "<< dest_t<<", "<<dest_r<<", "<<doRescale<<")"<<std::endl;
if (srcImage->getDataType() == destImage->getDataType() && !doRescale)
{
//osg::notify(osg::NOTICE)<<" Compatible pixelFormat and dataType."<<std::endl;
//OSG_NOTICE<<" Compatible pixelFormat and dataType."<<std::endl;
for(int slice = 0; slice<depth; ++slice)
{
for(int row = 0; row<height; ++row)
@@ -269,7 +269,7 @@ bool copyImage(const osg::Image* srcImage, int src_s, int src_t, int src_r, int
}
else
{
//osg::notify(osg::NOTICE)<<" Compatible pixelFormat and incompatible dataType."<<std::endl;
//OSG_NOTICE<<" Compatible pixelFormat and incompatible dataType."<<std::endl;
for(int slice = 0; slice<depth; ++slice)
{
for(int row = 0; row<height; ++row)
@@ -287,8 +287,8 @@ bool copyImage(const osg::Image* srcImage, int src_s, int src_t, int src_r, int
}
else
{
osg::notify(osg::NOTICE)<<"copyImage("<<srcImage<<", "<<src_s<<", "<< src_t<<", "<<src_r<<", "<<width<<", "<<height<<", "<<depth<<std::endl;
osg::notify(osg::NOTICE)<<" "<<destImage<<", "<<dest_s<<", "<< dest_t<<", "<<dest_r<<", "<<doRescale<<")"<<std::endl;
OSG_NOTICE<<"copyImage("<<srcImage<<", "<<src_s<<", "<< src_t<<", "<<src_r<<", "<<width<<", "<<height<<", "<<depth<<std::endl;
OSG_NOTICE<<" "<<destImage<<", "<<dest_s<<", "<< dest_t<<", "<<dest_r<<", "<<doRescale<<")"<<std::endl;
RecordRowOperator readOp(width);
WriteRowOperator writeOp;

View File

@@ -73,7 +73,7 @@ struct TriangleIndicesCollector
// discard degenerate points
if (v0==v1 || v1==v2 || v1==v2)
{
//osg::notify(osg::NOTICE)<<"Disgarding degenerate triangle"<<std::endl;
//OSG_NOTICE<<"Disgarding degenerate triangle"<<std::endl;
return;
}
@@ -102,7 +102,7 @@ bool BuildKdTree::build(KdTree::BuildOptions& options, osg::Geometry* geometry)
{
#ifdef VERBOSE_OUTPUT
osg::notify(osg::NOTICE)<<"osg::KDTreeBuilder::createKDTree()"<<std::endl;146
OSG_NOTICE<<"osg::KDTreeBuilder::createKDTree()"<<std::endl;146
#endif
osg::Vec3Array* vertices = dynamic_cast<osg::Vec3Array*>(geometry->getVertexArray());
@@ -116,7 +116,7 @@ bool BuildKdTree::build(KdTree::BuildOptions& options, osg::Geometry* geometry)
unsigned int estimatedSize = (unsigned int)(2.0*float(vertices->size())/float(options._targetNumTrianglesPerLeaf));
#ifdef VERBOSE_OUTPUT
osg::notify(osg::NOTICE)<<"kdTree->_kdNodes.reserve()="<<estimatedSize<<std::endl<<std::endl;
OSG_NOTICE<<"kdTree->_kdNodes.reserve()="<<estimatedSize<<std::endl<<std::endl;
#endif
_kdTree.getNodes().reserve(estimatedSize*5);
@@ -156,12 +156,12 @@ bool BuildKdTree::build(KdTree::BuildOptions& options, osg::Geometry* geometry)
#ifdef VERBOSE_OUTPUT
osg::notify(osg::NOTICE)<<"Root nodeNum="<<nodeNum<<std::endl;
OSG_NOTICE<<"Root nodeNum="<<nodeNum<<std::endl;
#endif
// osg::notify(osg::NOTICE)<<"_kdNodes.size()="<<k_kdNodes.size()<<" estimated size = "<<estimatedSize<<std::endl;
// osg::notify(osg::NOTICE)<<"_kdLeaves.size()="<<_kdLeaves.size()<<" estimated size = "<<estimatedSize<<std::endl<<std::endl;
// OSG_NOTICE<<"_kdNodes.size()="<<k_kdNodes.size()<<" estimated size = "<<estimatedSize<<std::endl;
// OSG_NOTICE<<"_kdLeaves.size()="<<_kdLeaves.size()<<" estimated size = "<<estimatedSize<<std::endl<<std::endl;
return !_kdTree.getNodes().empty();
@@ -174,7 +174,7 @@ void BuildKdTree::computeDivisions(KdTree::BuildOptions& options)
_bb.zMax()-_bb.zMin());
#ifdef VERBOSE_OUTPUT
osg::notify(osg::NOTICE)<<"computeDivisions("<<options._maxNumLevels<<") "<<dimensions<< " { "<<std::endl;
OSG_NOTICE<<"computeDivisions("<<options._maxNumLevels<<") "<<dimensions<< " { "<<std::endl;
#endif
_axisStack.reserve(options._maxNumLevels);
@@ -194,12 +194,12 @@ void BuildKdTree::computeDivisions(KdTree::BuildOptions& options)
dimensions[axis] /= 2.0f;
#ifdef VERBOSE_OUTPUT
osg::notify(osg::NOTICE)<<" "<<level<<", "<<dimensions<<", "<<axis<<std::endl;
OSG_NOTICE<<" "<<level<<", "<<dimensions<<", "<<axis<<std::endl;
#endif
}
#ifdef VERBOSE_OUTPUT
osg::notify(osg::NOTICE)<<"}"<<std::endl;
OSG_NOTICE<<"}"<<std::endl;
#endif
}
@@ -245,13 +245,13 @@ int BuildKdTree::divide(KdTree::BuildOptions& options, osg::BoundingBox& bb, int
#ifdef VERBOSE_OUTPUT
if (!node.bb.valid())
{
osg::notify(osg::NOTICE)<<"After reset "<<node.first<<","<<node.second<<std::endl;
osg::notify(osg::NOTICE)<<" bb._min ("<<node.bb._min<<")"<<std::endl;
osg::notify(osg::NOTICE)<<" bb._max ("<<node.bb._max<<")"<<std::endl;
OSG_NOTICE<<"After reset "<<node.first<<","<<node.second<<std::endl;
OSG_NOTICE<<" bb._min ("<<node.bb._min<<")"<<std::endl;
OSG_NOTICE<<" bb._max ("<<node.bb._max<<")"<<std::endl;
}
else
{
osg::notify(osg::NOTICE)<<"Set bb for nodeIndex = "<<nodeIndex<<std::endl;
OSG_NOTICE<<"Set bb for nodeIndex = "<<nodeIndex<<std::endl;
}
#endif
}
@@ -263,7 +263,7 @@ int BuildKdTree::divide(KdTree::BuildOptions& options, osg::BoundingBox& bb, int
int axis = _axisStack[level];
#ifdef VERBOSE_OUTPUT
osg::notify(osg::NOTICE)<<"divide("<<nodeIndex<<", "<<level<< "), axis="<<axis<<std::endl;
OSG_NOTICE<<"divide("<<nodeIndex<<", "<<level<< "), axis="<<axis<<std::endl;
#endif
if (node.first<0)
@@ -273,7 +273,7 @@ int BuildKdTree::divide(KdTree::BuildOptions& options, osg::BoundingBox& bb, int
int istart = -node.first-1;
int iend = istart+node.second-1;
//osg::notify(osg::NOTICE)<<" divide leaf"<<std::endl;
//OSG_NOTICE<<" divide leaf"<<std::endl;
float original_min = bb._min[axis];
float original_max = bb._max[axis];
@@ -315,20 +315,20 @@ int BuildKdTree::divide(KdTree::BuildOptions& options, osg::BoundingBox& bb, int
KdTree::KdNode rightLeaf(-left-1, (iend-left)+1);
#if 0
osg::notify(osg::NOTICE)<<"In node.first ="<<node.first <<" node.second ="<<node.second<<std::endl;
osg::notify(osg::NOTICE)<<" leftLeaf.first ="<<leftLeaf.first <<" leftLeaf.second ="<<leftLeaf.second<<std::endl;
osg::notify(osg::NOTICE)<<" rightLeaf.first="<<rightLeaf.first<<" rightLeaf.second="<<rightLeaf.second<<std::endl;
osg::notify(osg::NOTICE)<<" left="<<left<<" right="<<right<<std::endl;
OSG_NOTICE<<"In node.first ="<<node.first <<" node.second ="<<node.second<<std::endl;
OSG_NOTICE<<" leftLeaf.first ="<<leftLeaf.first <<" leftLeaf.second ="<<leftLeaf.second<<std::endl;
OSG_NOTICE<<" rightLeaf.first="<<rightLeaf.first<<" rightLeaf.second="<<rightLeaf.second<<std::endl;
OSG_NOTICE<<" left="<<left<<" right="<<right<<std::endl;
if (node.second != (leftLeaf.second +rightLeaf.second))
{
osg::notify(osg::NOTICE)<<"*** Error in size, leaf.second="<<node.second
OSG_NOTICE<<"*** Error in size, leaf.second="<<node.second
<<", leftLeaf.second="<<leftLeaf.second
<<", rightLeaf.second="<<rightLeaf.second<<std::endl;
}
else
{
osg::notify(osg::NOTICE)<<"Size OK, leaf.second="<<node.second
OSG_NOTICE<<"Size OK, leaf.second="<<node.second
<<", leftLeaf.second="<<leftLeaf.second
<<", rightLeaf.second="<<rightLeaf.second<<std::endl;
}
@@ -336,7 +336,7 @@ int BuildKdTree::divide(KdTree::BuildOptions& options, osg::BoundingBox& bb, int
if (leftLeaf.second<=0)
{
//osg::notify(osg::NOTICE)<<"LeftLeaf empty"<<std::endl;
//OSG_NOTICE<<"LeftLeaf empty"<<std::endl;
originalLeftChildIndex = 0;
//originalRightChildIndex = addNode(rightLeaf);
originalRightChildIndex = nodeIndex;
@@ -344,7 +344,7 @@ int BuildKdTree::divide(KdTree::BuildOptions& options, osg::BoundingBox& bb, int
}
else if (rightLeaf.second<=0)
{
//osg::notify(osg::NOTICE)<<"RightLeaf empty"<<std::endl;
//OSG_NOTICE<<"RightLeaf empty"<<std::endl;
// originalLeftChildIndex = addNode(leftLeaf);
originalLeftChildIndex = nodeIndex;
originalRightChildIndex = 0;
@@ -361,7 +361,7 @@ int BuildKdTree::divide(KdTree::BuildOptions& options, osg::BoundingBox& bb, int
float restore = bb._max[axis];
bb._max[axis] = mid;
//osg::notify(osg::NOTICE)<<" divide leftLeaf "<<kdTree.getNode(nodeNum).first<<std::endl;
//OSG_NOTICE<<" divide leftLeaf "<<kdTree.getNode(nodeNum).first<<std::endl;
int leftChildIndex = originalLeftChildIndex!=0 ? divide(options, bb, originalLeftChildIndex, level+1) : 0;
bb._max[axis] = restore;
@@ -369,7 +369,7 @@ int BuildKdTree::divide(KdTree::BuildOptions& options, osg::BoundingBox& bb, int
restore = bb._min[axis];
bb._min[axis] = mid;
//osg::notify(osg::NOTICE)<<" divide rightLeaf "<<kdTree.getNode(nodeNum).second<<std::endl;
//OSG_NOTICE<<" divide rightLeaf "<<kdTree.getNode(nodeNum).second<<std::endl;
int rightChildIndex = originalRightChildIndex!=0 ? divide(options, bb, originalRightChildIndex, level+1) : 0;
bb._min[axis] = restore;
@@ -392,29 +392,29 @@ int BuildKdTree::divide(KdTree::BuildOptions& options, osg::BoundingBox& bb, int
if (!newNodeRef.bb.valid())
{
osg::notify(osg::NOTICE)<<"leftChildIndex="<<leftChildIndex<<" && originalLeftChildIndex="<<originalLeftChildIndex<<std::endl;
osg::notify(osg::NOTICE)<<"rightChildIndex="<<rightChildIndex<<" && originalRightChildIndex="<<originalRightChildIndex<<std::endl;
OSG_NOTICE<<"leftChildIndex="<<leftChildIndex<<" && originalLeftChildIndex="<<originalLeftChildIndex<<std::endl;
OSG_NOTICE<<"rightChildIndex="<<rightChildIndex<<" && originalRightChildIndex="<<originalRightChildIndex<<std::endl;
osg::notify(osg::NOTICE)<<"Invalid BB leftChildIndex="<<leftChildIndex<<", "<<rightChildIndex<<std::endl;
osg::notify(osg::NOTICE)<<" bb._min ("<<newNodeRef.bb._min<<")"<<std::endl;
osg::notify(osg::NOTICE)<<" bb._max ("<<newNodeRef.bb._max<<")"<<std::endl;
OSG_NOTICE<<"Invalid BB leftChildIndex="<<leftChildIndex<<", "<<rightChildIndex<<std::endl;
OSG_NOTICE<<" bb._min ("<<newNodeRef.bb._min<<")"<<std::endl;
OSG_NOTICE<<" bb._max ("<<newNodeRef.bb._max<<")"<<std::endl;
if (leftChildIndex!=0)
{
osg::notify(osg::NOTICE)<<" getNode(leftChildIndex).bb min = "<<_kdTree.getNode(leftChildIndex).bb._min<<std::endl;
osg::notify(osg::NOTICE)<<" max = "<<_kdTree.getNode(leftChildIndex).bb._max<<std::endl;
OSG_NOTICE<<" getNode(leftChildIndex).bb min = "<<_kdTree.getNode(leftChildIndex).bb._min<<std::endl;
OSG_NOTICE<<" max = "<<_kdTree.getNode(leftChildIndex).bb._max<<std::endl;
}
if (rightChildIndex!=0)
{
osg::notify(osg::NOTICE)<<" getNode(rightChildIndex).bb min = "<<_kdTree.getNode(rightChildIndex).bb._min<<std::endl;
osg::notify(osg::NOTICE)<<" max = "<<_kdTree.getNode(rightChildIndex).bb._max<<std::endl;
OSG_NOTICE<<" getNode(rightChildIndex).bb min = "<<_kdTree.getNode(rightChildIndex).bb._min<<std::endl;
OSG_NOTICE<<" max = "<<_kdTree.getNode(rightChildIndex).bb._max<<std::endl;
}
}
}
}
else
{
osg::notify(osg::NOTICE)<<"NOT expecting to get here"<<std::endl;
OSG_NOTICE<<"NOT expecting to get here"<<std::endl;
}
return nodeIndex;
@@ -481,7 +481,7 @@ void IntersectKdTree::intersect(const KdTree::KdNode& node, const osg::Vec3& ls,
{
// treat as a leaf
//osg::notify(osg::NOTICE)<<"KdTree::intersect("<<&leaf<<")"<<std::endl;
//OSG_NOTICE<<"KdTree::intersect("<<&leaf<<")"<<std::endl;
int istart = -node.first-1;
int iend = istart + node.second;
@@ -489,7 +489,7 @@ void IntersectKdTree::intersect(const KdTree::KdNode& node, const osg::Vec3& ls,
{
//const Triangle& tri = _triangles[_primitiveIndices[i]];
const KdTree::Triangle& tri = _triangles[i];
// osg::notify(osg::NOTICE)<<" tri("<<tri.p1<<","<<tri.p2<<","<<tri.p3<<")"<<std::endl;
// OSG_NOTICE<<" tri("<<tri.p1<<","<<tri.p2<<","<<tri.p3<<")"<<std::endl;
const osg::Vec3& v0 = _vertices[tri.p0];
const osg::Vec3& v1 = _vertices[tri.p1];
@@ -579,7 +579,7 @@ void IntersectKdTree::intersect(const KdTree::KdNode& node, const osg::Vec3& ls,
intersection.r2 = r2;
#endif
// osg::notify(osg::NOTICE)<<" got intersection ("<<in<<") ratio="<<r<<std::endl;
// OSG_NOTICE<<" got intersection ("<<in<<") ratio="<<r<<std::endl;
}
}
else
@@ -723,7 +723,7 @@ bool IntersectKdTree::intersectAndClip(osg::Vec3& s, osg::Vec3& e, const osg::Bo
}
}
// osg::notify(osg::NOTICE)<<"clampped segment "<<s<<" "<<e<<std::endl;
// OSG_NOTICE<<"clampped segment "<<s<<" "<<e<<std::endl;
// if (s==e) return false;
@@ -768,7 +768,7 @@ bool KdTree::intersect(const osg::Vec3d& start, const osg::Vec3d& end, LineSegme
{
if (_kdNodes.empty())
{
osg::notify(osg::NOTICE)<<"Warning: _kdTree is empty"<<std::endl;
OSG_NOTICE<<"Warning: _kdTree is empty"<<std::endl;
return false;
}

View File

@@ -46,16 +46,16 @@ void Light::init( void )
_linear_attenuation = 0.0f;
_quadratic_attenuation = 0.0f;
// notify(DEBUG) << "_ambient "<<_ambient<<std::endl;
// notify(DEBUG) << "_diffuse "<<_diffuse<<std::endl;
// notify(DEBUG) << "_specular "<<_specular<<std::endl;
// notify(DEBUG) << "_position "<<_position<<std::endl;
// notify(DEBUG) << "_direction "<<_direction<<std::endl;
// notify(DEBUG) << "_spot_exponent "<<_spot_exponent<<std::endl;
// notify(DEBUG) << "_spot_cutoff "<<_spot_cutoff<<std::endl;
// notify(DEBUG) << "_constant_attenuation "<<_constant_attenuation<<std::endl;
// notify(DEBUG) << "_linear_attenuation "<<_linear_attenuation<<std::endl;
// notify(DEBUG) << "_quadratic_attenuation "<<_quadratic_attenuation<<std::endl;
// OSG_DEBUG << "_ambient "<<_ambient<<std::endl;
// OSG_DEBUG << "_diffuse "<<_diffuse<<std::endl;
// OSG_DEBUG << "_specular "<<_specular<<std::endl;
// OSG_DEBUG << "_position "<<_position<<std::endl;
// OSG_DEBUG << "_direction "<<_direction<<std::endl;
// OSG_DEBUG << "_spot_exponent "<<_spot_exponent<<std::endl;
// OSG_DEBUG << "_spot_cutoff "<<_spot_cutoff<<std::endl;
// OSG_DEBUG << "_constant_attenuation "<<_constant_attenuation<<std::endl;
// OSG_DEBUG << "_linear_attenuation "<<_linear_attenuation<<std::endl;
// OSG_DEBUG << "_quadratic_attenuation "<<_quadratic_attenuation<<std::endl;
}
void Light::setLightNum(int num)
@@ -113,7 +113,7 @@ void Light::captureLightState()
glGetLightfv( (GLenum)((int)GL_LIGHT0 + _lightnum), GL_LINEAR_ATTENUATION, &_linear_attenuation );
glGetLightfv( (GLenum)((int)GL_LIGHT0 + _lightnum), GL_QUADRATIC_ATTENUATION, &_quadratic_attenuation );
#else
osg::notify(osg::NOTICE)<<"Warning: Light::captureLightState() - not supported."<<std::endl;
OSG_NOTICE<<"Warning: Light::captureLightState() - not supported."<<std::endl;
#endif
}
@@ -131,6 +131,6 @@ void Light::apply(State&) const
glLightf ( (GLenum)((int)GL_LIGHT0 + _lightnum), GL_LINEAR_ATTENUATION, _linear_attenuation );
glLightf ( (GLenum)((int)GL_LIGHT0 + _lightnum), GL_QUADRATIC_ATTENUATION, _quadratic_attenuation );
#else
osg::notify(osg::NOTICE)<<"Warning: Light::apply(State&) - not supported."<<std::endl;
OSG_NOTICE<<"Warning: Light::apply(State&) - not supported."<<std::endl;
#endif
}

View File

@@ -77,7 +77,7 @@ void LightModel::apply(State&) const
glLightModeli(GL_LIGHT_MODEL_TWO_SIDE,_twoSided);
#else
osg::notify(osg::NOTICE)<<"Warning: LightModel::apply(State&) - not supported."<<std::endl;
OSG_NOTICE<<"Warning: LightModel::apply(State&) - not supported."<<std::endl;
#endif
}

View File

@@ -43,7 +43,7 @@ void LineStipple::apply(State&) const
#ifdef OSG_GL1_AVAILABLE
glLineStipple(_factor, _pattern);
#else
osg::notify(osg::NOTICE)<<"Warning: LineStipple::apply(State&) - not supported."<<std::endl;
OSG_NOTICE<<"Warning: LineStipple::apply(State&) - not supported."<<std::endl;
#endif
}

View File

@@ -34,7 +34,7 @@ void LogicOp::apply(State&) const
#ifdef OSG_GL_FIXED_FUNCTION_AVAILABLE
glLogicOp(static_cast<GLenum>(_opcode));
#else
osg::notify(osg::NOTICE)<<"Warning: LogicOp::apply(State&) - not supported."<<std::endl;
OSG_NOTICE<<"Warning: LogicOp::apply(State&) - not supported."<<std::endl;
#endif
}

View File

@@ -92,7 +92,7 @@ void Material::setAmbient(Face face, const Vec4& ambient )
_ambientBack = _ambientFront;
break;
default:
notify(NOTICE)<<"Notice: invalid Face passed to Material::setAmbient()."<<std::endl;
OSG_NOTICE<<"Notice: invalid Face passed to Material::setAmbient()."<<std::endl;
}
}
@@ -108,12 +108,12 @@ const Vec4& Material::getAmbient(Face face) const
case(FRONT_AND_BACK):
if (!_ambientFrontAndBack)
{
notify(NOTICE)<<"Notice: Material::getAmbient(FRONT_AND_BACK) called on material "<< std::endl;
notify(NOTICE)<<" with separate FRONT and BACK ambient colors."<< std::endl;
OSG_NOTICE<<"Notice: Material::getAmbient(FRONT_AND_BACK) called on material "<< std::endl;
OSG_NOTICE<<" with separate FRONT and BACK ambient colors."<< std::endl;
}
return _ambientFront;
}
notify(NOTICE)<<"Notice: invalid Face passed to Material::getAmbient()."<< std::endl;
OSG_NOTICE<<"Notice: invalid Face passed to Material::getAmbient()."<< std::endl;
return _ambientFront;
}
@@ -139,7 +139,7 @@ void Material::setDiffuse(Face face, const Vec4& diffuse )
_diffuseBack = _diffuseFront;
break;
default:
notify(NOTICE)<<"Notice: invalid Face passed to Material::setDiffuse()."<< std::endl;
OSG_NOTICE<<"Notice: invalid Face passed to Material::setDiffuse()."<< std::endl;
break;
}
}
@@ -156,12 +156,12 @@ const Vec4& Material::getDiffuse(Face face) const
case(FRONT_AND_BACK):
if (!_diffuseFrontAndBack)
{
notify(NOTICE)<<"Notice: Material::getDiffuse(FRONT_AND_BACK) called on material "<< std::endl;
notify(NOTICE)<<" with separate FRONT and BACK diffuse colors."<< std::endl;
OSG_NOTICE<<"Notice: Material::getDiffuse(FRONT_AND_BACK) called on material "<< std::endl;
OSG_NOTICE<<" with separate FRONT and BACK diffuse colors."<< std::endl;
}
return _diffuseFront;
}
notify(NOTICE)<<"Notice: invalid Face passed to Material::getDiffuse()."<< std::endl;
OSG_NOTICE<<"Notice: invalid Face passed to Material::getDiffuse()."<< std::endl;
return _diffuseFront;
}
@@ -187,7 +187,7 @@ void Material::setSpecular(Face face, const Vec4& specular )
_specularBack = _specularFront;
break;
default:
notify(NOTICE)<<"Notice: invalid Face passed to Material::setSpecular()."<< std::endl;
OSG_NOTICE<<"Notice: invalid Face passed to Material::setSpecular()."<< std::endl;
break;
}
}
@@ -204,12 +204,12 @@ const Vec4& Material::getSpecular(Face face) const
case(FRONT_AND_BACK):
if (!_specularFrontAndBack)
{
notify(NOTICE)<<"Notice: Material::getSpecular(FRONT_AND_BACK) called on material "<< std::endl;
notify(NOTICE)<<" with separate FRONT and BACK specular colors."<< std::endl;
OSG_NOTICE<<"Notice: Material::getSpecular(FRONT_AND_BACK) called on material "<< std::endl;
OSG_NOTICE<<" with separate FRONT and BACK specular colors."<< std::endl;
}
return _specularFront;
}
notify(NOTICE)<<"Notice: invalid Face passed to Material::getSpecular()."<< std::endl;
OSG_NOTICE<<"Notice: invalid Face passed to Material::getSpecular()."<< std::endl;
return _specularFront;
}
@@ -235,7 +235,7 @@ void Material::setEmission(Face face, const Vec4& emission )
_emissionBack = _emissionFront;
break;
default:
notify(NOTICE)<<"Notice: invalid Face passed to Material::setEmission()."<< std::endl;
OSG_NOTICE<<"Notice: invalid Face passed to Material::setEmission()."<< std::endl;
break;
}
}
@@ -252,12 +252,12 @@ const Vec4& Material::getEmission(Face face) const
case(FRONT_AND_BACK):
if (!_emissionFrontAndBack)
{
notify(NOTICE)<<"Notice: Material::getEmission(FRONT_AND_BACK) called on material "<< std::endl;
notify(NOTICE)<<" with separate FRONT and BACK emission colors."<< std::endl;
OSG_NOTICE<<"Notice: Material::getEmission(FRONT_AND_BACK) called on material "<< std::endl;
OSG_NOTICE<<" with separate FRONT and BACK emission colors."<< std::endl;
}
return _emissionFront;
}
notify(NOTICE)<<"Notice: invalid Face passed to Material::getEmission()."<< std::endl;
OSG_NOTICE<<"Notice: invalid Face passed to Material::getEmission()."<< std::endl;
return _emissionFront;
}
@@ -282,7 +282,7 @@ void Material::setShininess(Face face, float shininess )
_shininessBack = shininess;
break;
default:
notify(NOTICE)<<"Notice: invalid Face passed to Material::setShininess()."<< std::endl;
OSG_NOTICE<<"Notice: invalid Face passed to Material::setShininess()."<< std::endl;
break;
}
}
@@ -299,12 +299,12 @@ float Material::getShininess(Face face) const
case(FRONT_AND_BACK):
if (!_shininessFrontAndBack)
{
notify(NOTICE)<<"Notice: Material::getShininess(FRONT_AND_BACK) called on material "<< std::endl;
notify(NOTICE)<<" with separate FRONT and BACK shininess colors."<< std::endl;
OSG_NOTICE<<"Notice: Material::getShininess(FRONT_AND_BACK) called on material "<< std::endl;
OSG_NOTICE<<" with separate FRONT and BACK shininess colors."<< std::endl;
}
return _shininessFront;
}
notify(NOTICE)<<"Notice: invalid Face passed to Material::getShininess()."<< std::endl;
OSG_NOTICE<<"Notice: invalid Face passed to Material::getShininess()."<< std::endl;
return _shininessFront;
}
@@ -439,6 +439,6 @@ void Material::apply(State&) const
glMaterialf( GL_BACK, GL_SHININESS, _shininessBack );
}
#else
osg::notify(osg::NOTICE)<<"Warning: Material::apply(State&) - not supported."<<std::endl;
OSG_NOTICE<<"Warning: Material::apply(State&) - not supported."<<std::endl;
#endif
}

View File

@@ -41,7 +41,7 @@ double osg::asciiToDouble(const char* str)
++ptr;
}
// osg::notify(osg::NOTICE)<<"Read "<<str<<" result = "<<value<<std::endl;
// OSG_NOTICE<<"Read "<<str<<" result = "<<value<<std::endl;
return value;
}
@@ -100,14 +100,14 @@ double osg::asciiToDouble(const char* str)
if (pos==0)
{
// osg::notify(osg::NOTICE)<<"Read "<<str<<" result = "<<value[0]*sign[0]<<std::endl;
// OSG_NOTICE<<"Read "<<str<<" result = "<<value[0]*sign[0]<<std::endl;
return value[0]*sign[0];
}
else
{
double mantissa = value[0]*sign[0];
double exponent = value[1]*sign[1];
//osg::notify(osg::NOTICE)<<"Read "<<str<<" mantissa = "<<mantissa<<" exponent="<<exponent<<" result = "<<mantissa*pow(10.0,exponent)<<std::endl;
//OSG_NOTICE<<"Read "<<str<<" mantissa = "<<mantissa<<" exponent="<<exponent<<" result = "<<mantissa*pow(10.0,exponent)<<std::endl;
return mantissa*pow(10.0,exponent);
}
}

View File

@@ -39,7 +39,7 @@ void Multisample::apply(State& state) const
if (!extensions->isMultisampleSupported())
{
notify(WARN)<<"Warning: Multisample::apply(..) failed, Multisample is not support by OpenGL driver."<<std::endl;
OSG_WARN<<"Warning: Multisample::apply(..) failed, Multisample is not support by OpenGL driver."<<std::endl;
return;
}
@@ -102,7 +102,7 @@ void Multisample::Extensions::glSampleCoverage(GLclampf value, GLboolean invert)
}
else
{
notify(WARN)<<"Error: glSampleCoverage not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glSampleCoverage not supported by OpenGL driver"<<std::endl;
}
}

View File

@@ -58,7 +58,7 @@ void NodeTrackerCallback::setTrackNode(osg::Node* node)
{
if (!node)
{
osg::notify(osg::NOTICE)<<"NodeTrackerCallback::setTrackNode(Node*): Unable to set tracked node due to null Node*"<<std::endl;
OSG_NOTICE<<"NodeTrackerCallback::setTrackNode(Node*): Unable to set tracked node due to null Node*"<<std::endl;
return;
}
@@ -66,12 +66,12 @@ void NodeTrackerCallback::setTrackNode(osg::Node* node)
if (!parentNodePaths.empty())
{
osg::notify(osg::INFO)<<"NodeTrackerCallback::setTrackNode(Node*): Path set"<<std::endl;
OSG_INFO<<"NodeTrackerCallback::setTrackNode(Node*): Path set"<<std::endl;
setTrackNodePath(parentNodePaths[0]);
}
else
{
osg::notify(osg::NOTICE)<<"NodeTrackerCallback::setTrackNode(Node*): Unable to set tracked node due to empty parental path."<<std::endl;
OSG_NOTICE<<"NodeTrackerCallback::setTrackNode(Node*): Unable to set tracked node due to empty parental path."<<std::endl;
}
}

View File

@@ -206,11 +206,11 @@ struct RetrieveQueriesCallback : public osg::Camera::DrawCallback
// SceneView-based apps. Rely on the creating code to have passed
// in a valid Extensions pointer, and hope it's valid for any
// context that might be current.
osg::notify( osg::DEBUG_INFO ) << "osgOQ: RQCB: Using fallback path to obtain Extensions pointer." << std::endl;
OSG_DEBUG << "osgOQ: RQCB: Using fallback path to obtain Extensions pointer." << std::endl;
ext = _extensionsFallback;
if (!ext)
{
osg::notify( osg::FATAL ) << "osgOQ: RQCB: Extensions pointer fallback is NULL." << std::endl;
OSG_FATAL << "osgOQ: RQCB: Extensions pointer fallback is NULL." << std::endl;
return;
}
}
@@ -231,7 +231,7 @@ struct RetrieveQueriesCallback : public osg::Camera::DrawCallback
continue;
}
osg::notify( osg::DEBUG_INFO ) <<
OSG_DEBUG <<
"osgOQ: RQCB: Retrieving..." << std::endl;
#ifdef FORCE_QUERY_RESULT_AVAILABLE_BEFORE_RETRIEVAL
@@ -253,7 +253,7 @@ struct RetrieveQueriesCallback : public osg::Camera::DrawCallback
ext->glGetQueryObjectiv( tr->_id, GL_QUERY_RESULT, &(tr->_numPixels) );
if (tr->_numPixels < 0)
osg::notify( osg::WARN ) << "osgOQ: RQCB: " <<
OSG_WARN << "osgOQ: RQCB: " <<
"glGetQueryObjectiv returned negative value (" << tr->_numPixels << ")." << std::endl;
// Either retrieve last frame's results, or ignore it because the
@@ -265,7 +265,7 @@ struct RetrieveQueriesCallback : public osg::Camera::DrawCallback
}
elapsedTime = timer.delta_s(start_tick,timer.tick());
osg::notify( osg::INFO ) << "osgOQ: RQCB: " << "Retrieved " << count <<
OSG_INFO << "osgOQ: RQCB: " << "Retrieved " << count <<
" queries in " << elapsedTime << " seconds." << std::endl;
}
@@ -303,7 +303,7 @@ struct ClearQueriesCallback : public osg::Camera::DrawCallback
{
if (!_rqcb)
{
osg::notify( osg::FATAL ) << "osgOQ: CQCB: Invalid RQCB." << std::endl;
OSG_FATAL << "osgOQ: CQCB: Invalid RQCB." << std::endl;
return;
}
_rqcb->reset();
@@ -384,7 +384,7 @@ QueryGeometry::drawImplementation( osg::RenderInfo& renderInfo ) const
RetrieveQueriesCallback* >( cam->getPostDrawCallback() );
if (!rqcb)
{
osg::notify( osg::FATAL ) << "osgOQ: QG: Invalid RQCB." << std::endl;
OSG_FATAL << "osgOQ: QG: Invalid RQCB." << std::endl;
return;
}
rqcb->add( tr );
@@ -398,7 +398,7 @@ QueryGeometry::drawImplementation( osg::RenderInfo& renderInfo ) const
tr->_init = true;
}
osg::notify( osg::DEBUG_INFO ) <<
OSG_DEBUG <<
"osgOQ: QG: Querying for: " << _oqnName << std::endl;
ext->glBeginQuery( GL_SAMPLES_PASSED_ARB, tr->_id );
@@ -407,7 +407,7 @@ QueryGeometry::drawImplementation( osg::RenderInfo& renderInfo ) const
tr->_active = true;
osg::notify( osg::DEBUG_INFO ) <<
OSG_DEBUG <<
"osgOQ: QG. OQNName: " << _oqnName <<
", Ctx: " << contextID <<
", ID: " << tr->_id << std::endl;
@@ -415,8 +415,9 @@ QueryGeometry::drawImplementation( osg::RenderInfo& renderInfo ) const
{
GLenum err;
if ((err = glGetError()) != GL_NO_ERROR)
osg::notify( osg::FATAL ) <<
"osgOQ: QG: OpenGL error: " << err << "." << std::endl;
{
OSG_FATAL << "osgOQ: QG: OpenGL error: " << err << "." << std::endl;
}
}
#endif
@@ -573,8 +574,7 @@ OcclusionQueryNode::getPassed( const osg::Camera* camera, osg::NodeVisitor& nv )
if (_queryGeode->getDrawable( 0 ) == NULL)
{
osg::notify( osg::FATAL ) <<
"osgOQ: OcclusionQueryNode: No QueryGeometry." << std::endl;
OSG_FATAL << "osgOQ: OcclusionQueryNode: No QueryGeometry." << std::endl;
// Something's broke. Return true so we at least render correctly.
return true;
}
@@ -696,7 +696,7 @@ OcclusionQueryNode::setQueryStateSet( osg::StateSet* ss )
{
if (!_queryGeode)
{
osg::notify( osg::WARN ) << "osgOQ: OcclusionQueryNode:: Invalid query support node." << std::endl;
OSG_WARN << "osgOQ: OcclusionQueryNode:: Invalid query support node." << std::endl;
return;
}
@@ -707,7 +707,7 @@ OcclusionQueryNode::getQueryStateSet()
{
if (!_queryGeode)
{
osg::notify( osg::WARN ) << "osgOQ: OcclusionQueryNode:: Invalid query support node." << std::endl;
OSG_WARN << "osgOQ: OcclusionQueryNode:: Invalid query support node." << std::endl;
return NULL;
}
return _queryGeode->getStateSet();
@@ -718,7 +718,7 @@ OcclusionQueryNode::getQueryStateSet() const
{
if (!_queryGeode)
{
osg::notify( osg::WARN ) << "osgOQ: OcclusionQueryNode:: Invalid query support node." << std::endl;
OSG_WARN << "osgOQ: OcclusionQueryNode:: Invalid query support node." << std::endl;
return NULL;
}
return _queryGeode->getStateSet();
@@ -729,7 +729,7 @@ OcclusionQueryNode::setDebugStateSet( osg::StateSet* ss )
{
if (!_debugGeode)
{
osg::notify( osg::WARN ) << "osgOQ: OcclusionQueryNode:: Invalid debug support node." << std::endl;
OSG_WARN << "osgOQ: OcclusionQueryNode:: Invalid debug support node." << std::endl;
return;
}
_debugGeode->setStateSet( ss );
@@ -740,7 +740,7 @@ OcclusionQueryNode::getDebugStateSet()
{
if (!_debugGeode.valid())
{
osg::notify( osg::WARN ) << "osgOQ: OcclusionQueryNode:: Invalid debug support node." << std::endl;
OSG_WARN << "osgOQ: OcclusionQueryNode:: Invalid debug support node." << std::endl;
return NULL;
}
return _debugGeode->getStateSet();
@@ -750,7 +750,7 @@ OcclusionQueryNode::getDebugStateSet() const
{
if (!_debugGeode.valid())
{
osg::notify( osg::WARN ) << "osgOQ: OcclusionQueryNode:: Invalid debug support node." << std::endl;
OSG_WARN << "osgOQ: OcclusionQueryNode:: Invalid debug support node." << std::endl;
return NULL;
}
return _debugGeode->getStateSet();

View File

@@ -76,22 +76,22 @@ ref_ptr<Operation> OperationQueue::getNextOperation(bool blockIfEmpty)
if (!currentOperation->getKeep())
{
// OSG_NOTIFY(osg::INFO)<<"removing "<<currentOperation->getName()<<std::endl;
// OSG_INFO<<"removing "<<currentOperation->getName()<<std::endl;
// remove it from the operations queue
_currentOperationIterator = _operations.erase(_currentOperationIterator);
// OSG_NOTIFY(osg::INFO)<<"size "<<_operations.size()<<std::endl;
// OSG_INFO<<"size "<<_operations.size()<<std::endl;
if (_operations.empty())
{
// OSG_NOTIFY(osg::INFO)<<"setting block "<<_operations.size()<<std::endl;
// OSG_INFO<<"setting block "<<_operations.size()<<std::endl;
_operationsBlock->set(false);
}
}
else
{
// OSG_NOTIFY(osg::INFO)<<"increment "<<_currentOperation->getName()<<std::endl;
// OSG_INFO<<"increment "<<_currentOperation->getName()<<std::endl;
// move on to the next operation in the list.
++_currentOperationIterator;
@@ -102,7 +102,7 @@ ref_ptr<Operation> OperationQueue::getNextOperation(bool blockIfEmpty)
void OperationQueue::add(Operation* operation)
{
OSG_NOTIFY(osg::INFO)<<"Doing add"<<std::endl;
OSG_INFO<<"Doing add"<<std::endl;
// acquire the lock on the operations queue to prevent anyone else for modifying it at the same time
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_operationsMutex);
@@ -115,7 +115,7 @@ void OperationQueue::add(Operation* operation)
void OperationQueue::remove(Operation* operation)
{
OSG_NOTIFY(osg::INFO)<<"Doing remove operation"<<std::endl;
OSG_INFO<<"Doing remove operation"<<std::endl;
// acquire the lock on the operations queue to prevent anyone else for modifying it at the same time
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_operationsMutex);
@@ -138,7 +138,7 @@ void OperationQueue::remove(Operation* operation)
void OperationQueue::remove(const std::string& name)
{
OSG_NOTIFY(osg::INFO)<<"Doing remove named operation"<<std::endl;
OSG_INFO<<"Doing remove named operation"<<std::endl;
// acquire the lock on the operations queue to prevent anyone else for modifying it at the same time
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_operationsMutex);
@@ -166,7 +166,7 @@ void OperationQueue::remove(const std::string& name)
void OperationQueue::removeAllOperations()
{
OSG_NOTIFY(osg::INFO)<<"Doing remove all operations"<<std::endl;
OSG_INFO<<"Doing remove all operations"<<std::endl;
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_operationsMutex);
@@ -203,7 +203,7 @@ void OperationQueue::runOperations(Object* callingObject)
++_currentOperationIterator;
}
// OSG_NOTIFY(osg::INFO)<<"Doing op "<<_currentOperation->getName()<<" "<<this<<std::endl;
// OSG_INFO<<"Doing op "<<_currentOperation->getName()<<" "<<this<<std::endl;
// call the graphics operation.
(*operation)(callingObject);
@@ -258,11 +258,11 @@ OperationThread::OperationThread():
OperationThread::~OperationThread()
{
//OSG_NOTIFY(osg::NOTICE)<<"Destructing graphics thread "<<this<<std::endl;
//OSG_NOTICE<<"Destructing graphics thread "<<this<<std::endl;
cancel();
//OSG_NOTIFY(osg::NOTICE)<<"Done Destructing graphics thread "<<this<<std::endl;
//OSG_NOTICE<<"Done Destructing graphics thread "<<this<<std::endl;
}
void OperationThread::setOperationQueue(OperationQueue* opq)
@@ -286,13 +286,13 @@ void OperationThread::setDone(bool done)
if (done)
{
OSG_NOTIFY(osg::INFO)<<"set done "<<this<<std::endl;
OSG_INFO<<"set done "<<this<<std::endl;
{
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_threadMutex);
if (_currentOperation.valid())
{
OSG_NOTIFY(osg::INFO)<<"releasing "<<_currentOperation.get()<<std::endl;
OSG_INFO<<"releasing "<<_currentOperation.get()<<std::endl;
_currentOperation->release();
}
}
@@ -303,7 +303,7 @@ void OperationThread::setDone(bool done)
int OperationThread::cancel()
{
OSG_NOTIFY(osg::INFO)<<"Cancelling OperationThread "<<this<<" isRunning()="<<isRunning()<<std::endl;
OSG_INFO<<"Cancelling OperationThread "<<this<<" isRunning()="<<isRunning()<<std::endl;
int result = 0;
if( isRunning() )
@@ -311,7 +311,7 @@ int OperationThread::cancel()
_done = true;
OSG_NOTIFY(osg::INFO)<<" Doing cancel "<<this<<std::endl;
OSG_INFO<<" Doing cancel "<<this<<std::endl;
{
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_threadMutex);
@@ -344,12 +344,12 @@ int OperationThread::cancel()
#endif
// commenting out debug info as it was cashing crash on exit, presumable
// due to OSG_NOTIFY or std::cout destructing earlier than this destructor.
OSG_NOTIFY(osg::DEBUG_INFO)<<" Waiting for OperationThread to cancel "<<this<<std::endl;
OSG_DEBUG<<" Waiting for OperationThread to cancel "<<this<<std::endl;
OpenThreads::Thread::YieldCurrentThread();
}
}
OSG_NOTIFY(osg::INFO)<<" OperationThread::cancel() thread cancelled "<<this<<" isRunning()="<<isRunning()<<std::endl;
OSG_INFO<<" OperationThread::cancel() thread cancelled "<<this<<" isRunning()="<<isRunning()<<std::endl;
return result;
}
@@ -381,13 +381,13 @@ void OperationThread::removeAllOperations()
void OperationThread::run()
{
OSG_NOTIFY(osg::INFO)<<"Doing run "<<this<<" isRunning()="<<isRunning()<<std::endl;
OSG_INFO<<"Doing run "<<this<<" isRunning()="<<isRunning()<<std::endl;
bool firstTime = true;
do
{
// OSG_NOTIFY(osg::NOTICE)<<"In thread loop "<<this<<std::endl;
// OSG_NOTICE<<"In thread loop "<<this<<std::endl;
ref_ptr<Operation> operation;
ref_ptr<OperationQueue> operationQueue;
@@ -407,7 +407,7 @@ void OperationThread::run()
_currentOperation = operation;
}
// OSG_NOTIFY(osg::INFO)<<"Doing op "<<_currentOperation->getName()<<" "<<this<<std::endl;
// OSG_INFO<<"Doing op "<<_currentOperation->getName()<<" "<<this<<std::endl;
// call the graphics operation.
(*operation)(_parent.get());
@@ -426,10 +426,10 @@ void OperationThread::run()
firstTime = false;
}
// OSG_NOTIFY(osg::NOTICE)<<"operations.size()="<<_operations.size()<<" done="<<_done<<" testCancel()"<<testCancel()<<std::endl;
// OSG_NOTICE<<"operations.size()="<<_operations.size()<<" done="<<_done<<" testCancel()"<<testCancel()<<std::endl;
} while (!testCancel() && !_done);
OSG_NOTIFY(osg::INFO)<<"exit loop "<<this<<" isRunning()="<<isRunning()<<std::endl;
OSG_INFO<<"exit loop "<<this<<" isRunning()="<<isRunning()<<std::endl;
}

View File

@@ -95,7 +95,7 @@ void Point::apply(State& state) const
extensions->glPointParameterf(GL_POINT_SIZE_MIN, _minSize);
extensions->glPointParameterf(GL_POINT_SIZE_MAX, _maxSize);
#else
osg::notify(osg::NOTICE)<<"Warning: Point::apply(State&) - not supported."<<std::endl;
OSG_NOTICE<<"Warning: Point::apply(State&) - not supported."<<std::endl;
#endif
}
@@ -166,7 +166,7 @@ void Point::Extensions::glPointParameteri(GLenum pname, GLint param) const
}
else
{
notify(WARN)<<"Error: glPointParameteri not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glPointParameteri not supported by OpenGL driver"<<std::endl;
}
}
@@ -178,7 +178,7 @@ void Point::Extensions::glPointParameterf(GLenum pname, GLfloat param) const
}
else
{
notify(WARN)<<"Error: glPointParameterf not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glPointParameterf not supported by OpenGL driver"<<std::endl;
}
}
@@ -190,6 +190,6 @@ void Point::Extensions::glPointParameterfv(GLenum pname, const GLfloat *params)
}
else
{
notify(WARN)<<"Error: glPointParameterfv not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glPointParameterfv not supported by OpenGL driver"<<std::endl;
}
}

View File

@@ -64,7 +64,7 @@ void PointSprite::apply(osg::State& state) const
if (extensions->isPointSpriteCoordOriginSupported())
extensions->glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN,_coordOriginMode);
#else
osg::notify(osg::NOTICE)<<"Warning: PointSprite::apply(State&) - not supported."<<std::endl;
OSG_NOTICE<<"Warning: PointSprite::apply(State&) - not supported."<<std::endl;
#endif
}

View File

@@ -62,7 +62,7 @@ PolygonMode::Mode PolygonMode::getMode(Face face) const
case(FRONT_AND_BACK):
return _modeFront;
}
notify(WARN)<<"Warning : invalid Face passed to PolygonMode::getMode(Face face)"<<std::endl;
OSG_WARN<<"Warning : invalid Face passed to PolygonMode::getMode(Face face)"<<std::endl;
return _modeFront;
}
@@ -79,7 +79,7 @@ void PolygonMode::apply(State&) const
glPolygonMode(GL_BACK,(GLenum)_modeBack);
}
#else
osg::notify(osg::NOTICE)<<"Warning: PolygonMode::apply(State&) - not supported."<<std::endl;
OSG_NOTICE<<"Warning: PolygonMode::apply(State&) - not supported."<<std::endl;
#endif
}

View File

@@ -53,7 +53,7 @@ bool PolygonOffset::areFactorAndUnitsMultipliersSet()
void PolygonOffset::setFactorAndUnitsMultipliersUsingBestGuessForDriver()
{
s_MultiplerSet = true;
// osg::notify(osg::NOTICE)<<"PolygonOffset::setFactorAndUnitMultipliersUsingBestGuessForDriver()"<<std::endl;
// OSG_NOTICE<<"PolygonOffset::setFactorAndUnitMultipliersUsingBestGuessForDriver()"<<std::endl;
#if 0
const GLubyte* renderer = glGetString(GL_RENDERER);
@@ -65,7 +65,7 @@ void PolygonOffset::setFactorAndUnitsMultipliersUsingBestGuessForDriver()
{
setFactorMultiplier(1.0f);
setUnitsMultiplier(128.0f);
osg::notify(osg::INFO)<<"PolygonOffset::setFactorAndUnitsMultipliersUsingBestGuessForDriver() apply ATI workaround."<<std::endl;
OSG_INFO<<"PolygonOffset::setFactorAndUnitsMultipliersUsingBestGuessForDriver() apply ATI workaround."<<std::endl;
}
}
#endif

View File

@@ -84,7 +84,7 @@ void PolygonStipple::apply(State&) const
#ifdef OSG_GL1_AVAILABLE
glPolygonStipple(_mask);
#else
osg::notify(osg::NOTICE)<<"Warning: PolygonStipple::apply(State&) - not supported."<<std::endl;
OSG_NOTICE<<"Warning: PolygonStipple::apply(State&) - not supported."<<std::endl;
#endif
}

View File

@@ -302,7 +302,7 @@ void Program::setParameter( GLenum pname, GLint value )
dirtyProgram(); // needed?
break;
default:
osg::notify(osg::WARN) << "setParameter invalid param " << pname << std::endl;
OSG_WARN << "setParameter invalid param " << pname << std::endl;
break;
}
}
@@ -315,7 +315,7 @@ GLint Program::getParameter( GLenum pname ) const
case GL_GEOMETRY_INPUT_TYPE_EXT: return _geometryInputType;
case GL_GEOMETRY_OUTPUT_TYPE_EXT: return _geometryOutputType;
}
osg::notify(osg::WARN) << "getParameter invalid param " << pname << std::endl;
OSG_WARN << "getParameter invalid param " << pname << std::endl;
return 0;
}
@@ -453,11 +453,10 @@ void Program::PerContextProgram::linkProgram(osg::State& state)
if( ! _needsLink ) return;
_needsLink = false;
osg::notify(osg::INFO)
<< "Linking osg::Program \"" << _program->getName() << "\""
<< " id=" << _glProgramHandle
<< " contextID=" << _contextID
<< std::endl;
OSG_INFO << "Linking osg::Program \"" << _program->getName() << "\""
<< " id=" << _glProgramHandle
<< " contextID=" << _contextID
<< std::endl;
if (_extensions->isGeometryShader4Supported())
{
@@ -489,7 +488,7 @@ void Program::PerContextProgram::linkProgram(osg::State& state)
for( AttribBindingList::const_iterator itr = programBindlist.begin();
itr != programBindlist.end(); ++itr )
{
osg::notify(osg::NOTICE)<<"Program's vertex attrib binding "<<itr->second<<", "<<itr->first<<std::endl;
OSG_NOTICE<<"Program's vertex attrib binding "<<itr->second<<", "<<itr->first<<std::endl;
_extensions->glBindAttribLocation( _glProgramHandle, itr->second, reinterpret_cast<const GLchar*>(itr->first.c_str()) );
}
@@ -501,7 +500,7 @@ void Program::PerContextProgram::linkProgram(osg::State& state)
for( AttribBindingList::const_iterator itr = stateBindlist.begin();
itr != stateBindlist.end(); ++itr )
{
osg::notify(osg::NOTICE)<<"State's vertex attrib binding "<<itr->second<<", "<<itr->first<<std::endl;
OSG_NOTICE<<"State's vertex attrib binding "<<itr->second<<", "<<itr->first<<std::endl;
_extensions->glBindAttribLocation( _glProgramHandle, itr->second, reinterpret_cast<const GLchar*>(itr->first.c_str()) );
}
}
@@ -521,12 +520,12 @@ void Program::PerContextProgram::linkProgram(osg::State& state)
_isLinked = (linked == GL_TRUE);
if( ! _isLinked )
{
osg::notify(osg::WARN) << "glLinkProgram \""<< _program->getName() << "\" FAILED" << std::endl;
OSG_WARN << "glLinkProgram \""<< _program->getName() << "\" FAILED" << std::endl;
std::string infoLog;
if( getInfoLog(infoLog) )
{
osg::notify(osg::WARN) << "Program \""<< _program->getName() << "\" "
OSG_WARN << "Program \""<< _program->getName() << "\" "
"infolog:\n" << infoLog << std::endl;
}
@@ -537,7 +536,7 @@ void Program::PerContextProgram::linkProgram(osg::State& state)
std::string infoLog;
if( getInfoLog(infoLog) )
{
osg::notify(osg::INFO) << "Program \""<< _program->getName() << "\" "<<
OSG_INFO << "Program \""<< _program->getName() << "\" "<<
"link succeded, infolog:\n" << infoLog << std::endl;
}
}
@@ -564,12 +563,11 @@ void Program::PerContextProgram::linkProgram(osg::State& state)
{
_uniformInfoMap[reinterpret_cast<char*>(name)] = ActiveVarInfo(loc,type,size);
osg::notify(osg::INFO)
<< "\tUniform \"" << name << "\""
<< " loc="<< loc
<< " size="<< size
<< " type=" << Uniform::getTypename((Uniform::Type)type)
<< std::endl;
OSG_INFO << "\tUniform \"" << name << "\""
<< " loc="<< loc
<< " size="<< size
<< " type=" << Uniform::getTypename((Uniform::Type)type)
<< std::endl;
}
}
delete [] name;
@@ -596,16 +594,15 @@ void Program::PerContextProgram::linkProgram(osg::State& state)
{
_attribInfoMap[reinterpret_cast<char*>(name)] = ActiveVarInfo(loc,type,size);
osg::notify(osg::INFO)
<< "\tAttrib \"" << name << "\""
<< " loc=" << loc
<< " size=" << size
<< std::endl;
OSG_INFO << "\tAttrib \"" << name << "\""
<< " loc=" << loc
<< " size=" << size
<< std::endl;
}
}
delete [] name;
}
osg::notify(osg::INFO) << std::endl;
OSG_INFO << std::endl;
}
bool Program::PerContextProgram::validateProgram()
@@ -616,17 +613,16 @@ bool Program::PerContextProgram::validateProgram()
if( validated == GL_TRUE)
return true;
osg::notify(osg::INFO)
<< "glValidateProgram FAILED \"" << _program->getName() << "\""
<< " id=" << _glProgramHandle
<< " contextID=" << _contextID
<< std::endl;
OSG_INFO << "glValidateProgram FAILED \"" << _program->getName() << "\""
<< " id=" << _glProgramHandle
<< " contextID=" << _contextID
<< std::endl;
std::string infoLog;
if( getInfoLog(infoLog) )
osg::notify(osg::INFO) << "infolog:\n" << infoLog << std::endl;
OSG_INFO << "infolog:\n" << infoLog << std::endl;
osg::notify(osg::INFO) << std::endl;
OSG_INFO << std::endl;
return false;
}

View File

@@ -217,7 +217,7 @@ void Quat::makeRotate_original( const Vec3d& from, const Vec3d& to )
if ( fabs(cosangle - 1) < epsilon )
{
osg::notify(osg::INFO)<<"*** Quat::makeRotate(from,to) with near co-linear vectors, epsilon= "<<fabs(cosangle-1)<<std::endl;
OSG_INFO<<"*** Quat::makeRotate(from,to) with near co-linear vectors, epsilon= "<<fabs(cosangle-1)<<std::endl;
// cosangle is close to 1, so the vectors are close to being coincident
// Need to generate an angle of zero with any vector we like

View File

@@ -351,7 +351,7 @@ void Sequence::traverse(NodeVisitor& nv)
{
_nrepsRemain = 0;
_mode = STOP;
osg::notify(osg::WARN) << "stopping because elapsed time greater or equal to time remaining to repeat the sequence\n";
OSG_WARN << "stopping because elapsed time greater or equal to time remaining to repeat the sequence\n";
}
}
@@ -371,7 +371,7 @@ void Sequence::traverse(NodeVisitor& nv)
}
}
else
osg::notify(osg::WARN) << "osg::Sequence::traverse(NodeVisitor&) requires a valid FrameStamp to function, sequence not updated.\n";
OSG_WARN << "osg::Sequence::traverse(NodeVisitor&) requires a valid FrameStamp to function, sequence not updated.\n";
}

View File

@@ -31,6 +31,6 @@ void ShadeModel::apply(State&) const
#ifdef OSG_GL_FIXED_FUNCTION_AVAILABLE
glShadeModel((GLenum)_mode);
#else
osg::notify(osg::NOTICE)<<"Warning: ShadeModel::apply(State&) - not supported."<<std::endl;
OSG_NOTICE<<"Warning: ShadeModel::apply(State&) - not supported."<<std::endl;
#endif
}

View File

@@ -181,7 +181,7 @@ bool Shader::setType(Type t)
if (_type != UNDEFINED)
{
osg::notify(osg::WARN) << "cannot change type of Shader" << std::endl;
OSG_WARN << "cannot change type of Shader" << std::endl;
return false;
}
@@ -228,11 +228,11 @@ bool Shader::loadShaderSourceFromFile( const std::string& fileName )
sourceFile.open(fileName.c_str(), std::ios::binary);
if(!sourceFile)
{
osg::notify(osg::WARN)<<"Error: can't open file \""<<fileName<<"\""<<std::endl;
OSG_WARN<<"Error: can't open file \""<<fileName<<"\""<<std::endl;
return false;
}
osg::notify(osg::INFO)<<"Loading shader source file \""<<fileName<<"\""<<std::endl;
OSG_INFO<<"Loading shader source file \""<<fileName<<"\""<<std::endl;
_shaderFileName = fileName;
sourceFile.seekg(0, std::ios::end);
@@ -295,7 +295,7 @@ Shader::PerContextShader* Shader::getPCS(unsigned int contextID) const
{
if( getType() == UNDEFINED )
{
osg::notify(osg::WARN) << "Shader type is UNDEFINED" << std::endl;
OSG_WARN << "Shader type is UNDEFINED" << std::endl;
return 0;
}
@@ -446,7 +446,7 @@ void Shader::PerContextShader::compileShader(osg::State& state)
for(GLint i=0; i<numFormats; ++i)
{
osg::notify(osg::NOTICE)<<" format="<<formats[i]<<std::endl;
OSG_NOTICE<<" format="<<formats[i]<<std::endl;
GLenum shaderBinaryFormat = formats[i];
glShaderBinary(1, &_glShaderHandle, shaderBinaryFormat, _shader->getShaderBinary()->getData(), _shader->getShaderBinary()->getSize());
if (glGetError() == GL_NO_ERROR)
@@ -459,26 +459,26 @@ void Shader::PerContextShader::compileShader(osg::State& state)
if (_shader->getShaderSource().empty())
{
osg::notify(osg::WARN)<<"Warning: No suitable shader of supported format by GLES driver found in shader binary, unable to compile shader."<<std::endl;
OSG_WARN<<"Warning: No suitable shader of supported format by GLES driver found in shader binary, unable to compile shader."<<std::endl;
_isCompiled = false;
return;
}
else
{
osg::notify(osg::NOTICE)<<"osg::Shader::compileShader(): No suitable shader of supported format by GLES driver found in shader binary, falling back to shader source."<<std::endl;
OSG_NOTICE<<"osg::Shader::compileShader(): No suitable shader of supported format by GLES driver found in shader binary, falling back to shader source."<<std::endl;
}
}
else
{
if (_shader->getShaderSource().empty())
{
osg::notify(osg::WARN)<<"Warning: No shader binary formats supported by GLES driver, unable to compile shader."<<std::endl;
OSG_WARN<<"Warning: No shader binary formats supported by GLES driver, unable to compile shader."<<std::endl;
_isCompiled = false;
return;
}
else
{
osg::notify(osg::NOTICE)<<"osg::Shader::compileShader(): No shader binary formats supported by GLES driver, falling back to shader source."<<std::endl;
OSG_NOTICE<<"osg::Shader::compileShader(): No shader binary formats supported by GLES driver, falling back to shader source."<<std::endl;
}
}
}
@@ -494,9 +494,8 @@ void Shader::PerContextShader::compileShader(osg::State& state)
if (osg::getNotifyLevel()>=osg::INFO)
{
osg::notify(osg::INFO)
<< "\nCompiling " << _shader->getTypename()
<< " source:\n" << sourceWithLineNumbers << std::endl;
OSG_INFO << "\nCompiling " << _shader->getTypename()
<< " source:\n" << sourceWithLineNumbers << std::endl;
}
GLint compiled = GL_FALSE;
@@ -508,13 +507,13 @@ void Shader::PerContextShader::compileShader(osg::State& state)
_isCompiled = (compiled == GL_TRUE);
if( ! _isCompiled )
{
osg::notify(osg::WARN) << _shader->getTypename() << " glCompileShader \""
OSG_WARN << _shader->getTypename() << " glCompileShader \""
<< _shader->getName() << "\" FAILED" << std::endl;
std::string infoLog;
if( getInfoLog(infoLog) )
{
osg::notify(osg::WARN) << _shader->getTypename() << " Shader \""
OSG_WARN << _shader->getTypename() << " Shader \""
<< _shader->getName() << "\" infolog:\n" << infoLog << std::endl;
}
}
@@ -523,7 +522,7 @@ void Shader::PerContextShader::compileShader(osg::State& state)
std::string infoLog;
if( getInfoLog(infoLog) )
{
osg::notify(osg::INFO) << _shader->getTypename() << " Shader \""
OSG_INFO << _shader->getTypename() << " Shader \""
<< _shader->getName() << "\" infolog:\n" << infoLog << std::endl;
}
}

View File

@@ -37,7 +37,7 @@ class DrawShapeVisitor : public ConstShapeVisitor
#if 0
if (hints)
{
notify(NOTICE)<<"Warning: TessellationHints ignored in present osg::ShapeDrawable implementation."<<std::endl;
OSG_NOTICE<<"Warning: TessellationHints ignored in present osg::ShapeDrawable implementation."<<std::endl;
}
#endif
}
@@ -846,7 +846,7 @@ void DrawShapeVisitor::apply(const Capsule& capsule)
void DrawShapeVisitor::apply(const InfinitePlane&)
{
notify(NOTICE)<<"Warning: DrawShapeVisitor::apply(const InfinitePlane& plane) not yet implemented. "<<std::endl;
OSG_NOTICE<<"Warning: DrawShapeVisitor::apply(const InfinitePlane& plane) not yet implemented. "<<std::endl;
}
void DrawShapeVisitor::apply(const TriangleMesh& mesh)
@@ -1843,7 +1843,7 @@ void PrimitiveShapeVisitor::apply(const Capsule& capsule)
void PrimitiveShapeVisitor::apply(const InfinitePlane&)
{
notify(NOTICE)<<"Warning: PrimitiveShapeVisitor::apply(const InfinitePlane& plane) not yet implemented. "<<std::endl;
OSG_NOTICE<<"Warning: PrimitiveShapeVisitor::apply(const InfinitePlane& plane) not yet implemented. "<<std::endl;
}
void PrimitiveShapeVisitor::apply(const TriangleMesh& mesh)

View File

@@ -158,7 +158,7 @@ State::~State()
//_vertexAttribArrayList.clear();
// OSG_NOTIFY(osg::NOTICE)<<"State::~State()"<<this<<std::endl;
// OSG_NOTICE<<"State::~State()"<<this<<std::endl;
for(AppliedProgramObjectSet::iterator itr = _appliedProgramObjectSet.begin();
itr != _appliedProgramObjectSet.end();
++itr)
@@ -173,7 +173,7 @@ void State::objectDeleted(void* object)
AppliedProgramObjectSet::iterator itr = _appliedProgramObjectSet.find(ppcp);
if (itr != _appliedProgramObjectSet.end())
{
// OSG_NOTIFY(osg::NOTICE)<<"Removing _appliedProgramObjectSet entry "<<ppcp<<std::endl;
// OSG_NOTICE<<"Removing _appliedProgramObjectSet entry "<<ppcp<<std::endl;
_appliedProgramObjectSet.erase(itr);
}
}
@@ -293,14 +293,14 @@ void State::setMaxTexturePoolSize(unsigned int size)
{
_maxTexturePoolSize = size;
osg::Texture::getTextureObjectManager(getContextID())->setMaxTexturePoolSize(size);
OSG_NOTIFY(osg::INFO)<<"osg::State::_maxTexturePoolSize="<<_maxTexturePoolSize<<std::endl;
OSG_INFO<<"osg::State::_maxTexturePoolSize="<<_maxTexturePoolSize<<std::endl;
}
void State::setMaxBufferObjectPoolSize(unsigned int size)
{
_maxBufferObjectPoolSize = size;
osg::GLBufferObjectManager::getGLBufferObjectManager(getContextID())->setMaxGLBufferObjectPoolSize(_maxBufferObjectPoolSize);
OSG_NOTIFY(osg::INFO)<<"osg::State::_maxBufferObjectPoolSize="<<_maxBufferObjectPoolSize<<std::endl;
OSG_INFO<<"osg::State::_maxBufferObjectPoolSize="<<_maxBufferObjectPoolSize<<std::endl;
}
void State::pushStateSet(const StateSet* dstate)
@@ -332,12 +332,12 @@ void State::pushStateSet(const StateSet* dstate)
pushUniformList(_uniformMap,dstate->getUniformList());
}
// OSG_NOTIFY(osg::NOTICE)<<"State::pushStateSet()"<<_stateStateStack.size()<<std::endl;
// OSG_NOTICE<<"State::pushStateSet()"<<_stateStateStack.size()<<std::endl;
}
void State::popAllStateSets()
{
// OSG_NOTIFY(osg::NOTICE)<<"State::popAllStateSets()"<<_stateStateStack.size()<<std::endl;
// OSG_NOTICE<<"State::popAllStateSets()"<<_stateStateStack.size()<<std::endl;
while (!_stateStateStack.empty()) popStateSet();
@@ -349,7 +349,7 @@ void State::popAllStateSets()
void State::popStateSet()
{
// OSG_NOTIFY(osg::NOTICE)<<"State::popStateSet()"<<_stateStateStack.size()<<std::endl;
// OSG_NOTICE<<"State::popStateSet()"<<_stateStateStack.size()<<std::endl;
if (_stateStateStack.empty()) return;
@@ -414,7 +414,7 @@ void State::removeStateSet(unsigned int pos)
{
if (pos >= _stateStateStack.size())
{
OSG_NOTIFY(osg::NOTICE)<<"Warning: State::removeStateSet("<<pos<<") out of range"<<std::endl;
OSG_NOTICE<<"Warning: State::removeStateSet("<<pos<<") out of range"<<std::endl;
return;
}
@@ -784,7 +784,7 @@ void State::setInterleavedArrays( GLenum format, GLsizei stride, const GLvoid* p
#if defined(OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE) && !defined(OSG_GLES1_AVAILABLE)
glInterleavedArrays( format, stride, pointer);
#else
OSG_NOTIFY(osg::NOTICE)<<"Warning: State::setInterleavedArrays(..) not implemented."<<std::endl;
OSG_NOTICE<<"Warning: State::setInterleavedArrays(..) not implemented."<<std::endl;
#endif
// the crude way, assume that all arrays have been effected so dirty them and
@@ -921,7 +921,7 @@ void State::setVertexAttribPointer( unsigned int index,
{
if (_glVertexAttribPointer)
{
// OSG_NOTIFY(osg::NOTICE)<<"State::setVertexAttribPointer("<<index<<",...)"<<std::endl;
// OSG_NOTICE<<"State::setVertexAttribPointer("<<index<<",...)"<<std::endl;
if ( index >= _vertexAttribArrayList.size()) _vertexAttribArrayList.resize(index+1);
EnabledArrayPair& eap = _vertexAttribArrayList[index];
@@ -929,12 +929,12 @@ void State::setVertexAttribPointer( unsigned int index,
if (!eap._enabled || eap._dirty)
{
eap._enabled = true;
// OSG_NOTIFY(osg::NOTICE)<<" _glEnableVertexAttribArray( "<<index<<" )"<<std::endl;
// OSG_NOTICE<<" _glEnableVertexAttribArray( "<<index<<" )"<<std::endl;
_glEnableVertexAttribArray( index );
}
//if (eap._pointer != ptr || eap._normalized!=normalized || eap._dirty)
{
// OSG_NOTIFY(osg::NOTICE)<<" _glVertexAttribPointer( "<<index<<" )"<<std::endl;
// OSG_NOTICE<<" _glVertexAttribPointer( "<<index<<" )"<<std::endl;
_glVertexAttribPointer( index, size, type, normalized, stride, ptr );
eap._pointer = ptr;
eap._normalized = normalized;
@@ -957,7 +957,7 @@ void State::disableVertexAttribPointer( unsigned int index )
{
eap._enabled = false;
eap._dirty = false;
// OSG_NOTIFY(osg::NOTICE)<<" _glDisableVertexAttribArray( "<<index<<" )"<<std::endl;
// OSG_NOTICE<<" _glDisableVertexAttribArray( "<<index<<" )"<<std::endl;
_glDisableVertexAttribArray( index );
}
}
@@ -974,7 +974,7 @@ void State::disableVertexAttribPointersAboveAndIncluding( unsigned int index )
{
eap._enabled = false;
eap._dirty = false;
// OSG_NOTIFY(osg::NOTICE)<<" State::disableVertexAttribPointersAboveAndIncluding(): _glDisableVertexAttribArray( "<<index<<" )"<<std::endl;
// OSG_NOTICE<<" State::disableVertexAttribPointersAboveAndIncluding(): _glDisableVertexAttribArray( "<<index<<" )"<<std::endl;
_glDisableVertexAttribArray( index );
}
++index;
@@ -984,7 +984,7 @@ void State::disableVertexAttribPointersAboveAndIncluding( unsigned int index )
void State::lazyDisablingOfVertexAttributes()
{
// OSG_NOTIFY(osg::NOTICE)<<"lazyDisablingOfVertexAttributes()"<<std::endl;
// OSG_NOTICE<<"lazyDisablingOfVertexAttributes()"<<std::endl;
if (!_useVertexAttributeAliasing)
{
_vertexArray._lazy_disable = true;
@@ -1010,7 +1010,7 @@ void State::lazyDisablingOfVertexAttributes()
void State::applyDisablingOfVertexAttributes()
{
//OSG_NOTIFY(osg::NOTICE)<<"start of applyDisablingOfVertexAttributes()"<<std::endl;
//OSG_NOTICE<<"start of applyDisablingOfVertexAttributes()"<<std::endl;
if (!_useVertexAttributeAliasing)
{
if (_vertexArray._lazy_disable) disableVertexPointer();
@@ -1027,7 +1027,7 @@ void State::applyDisablingOfVertexAttributes()
{
if (_vertexAttribArrayList[i]._lazy_disable) disableVertexAttribPointer(i);
}
// OSG_NOTIFY(osg::NOTICE)<<"end of applyDisablingOfVertexAttributes()"<<std::endl;
// OSG_NOTICE<<"end of applyDisablingOfVertexAttributes()"<<std::endl;
}
@@ -1231,9 +1231,9 @@ namespace State_Utils
bool State::convertVertexShaderSourceToOsgBuiltIns(std::string& source) const
{
OSG_NOTIFY(osg::NOTICE)<<"State::convertShaderSourceToOsgBuiltIns()"<<std::endl;
OSG_NOTICE<<"State::convertShaderSourceToOsgBuiltIns()"<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"++Before Converted source "<<std::endl<<source<<std::endl<<"++++++++"<<std::endl;
OSG_NOTICE<<"++Before Converted source "<<std::endl<<source<<std::endl<<"++++++++"<<std::endl;
// replace ftransform as it only works with built-ins
State_Utils::replace(source, "ftransform()", "gl_ModelViewProjectionMatrix * gl_Vertex");
@@ -1259,7 +1259,7 @@ bool State::convertVertexShaderSourceToOsgBuiltIns(std::string& source) const
State_Utils::replaceAndInsertDeclaration(source, "gl_ProjectionMatrix", "osg_ProjectionMatrix", "uniform mat4 ");
State_Utils::replaceAndInsertDeclaration(source, "gl_NormalMatrix", "osg_NormalMatrix", "uniform mat3 ");
OSG_NOTIFY(osg::NOTICE)<<"-------- Converted source "<<std::endl<<source<<std::endl<<"----------------"<<std::endl;
OSG_NOTICE<<"-------- Converted source "<<std::endl<<source<<std::endl<<"----------------"<<std::endl;
return true;
}
@@ -1344,7 +1344,7 @@ void State::updateModelViewAndProjectionMatrixUniforms()
void State::drawQuads(GLint first, GLsizei count, GLsizei primCount)
{
// OSG_NOTIFY(osg::NOTICE)<<"State::drawQuads("<<first<<", "<<count<<")"<<std::endl;
// OSG_NOTICE<<"State::drawQuads("<<first<<", "<<count<<")"<<std::endl;
unsigned int array = first % 4;
unsigned int offsetFirst = ((first-array) / 4) * 6;
@@ -1354,7 +1354,7 @@ void State::drawQuads(GLint first, GLsizei count, GLsizei primCount)
Indices& indices = _quadIndices[array];
if (endOfIndices>65536)
{
OSG_NOTIFY(osg::NOTICE)<<"Warning: State::drawQuads("<<first<<", "<<count<<") too large handle in remapping to ushort glDrawElements."<<std::endl;
OSG_NOTICE<<"Warning: State::drawQuads("<<first<<", "<<count<<") too large handle in remapping to ushort glDrawElements."<<std::endl;
endOfIndices = 65536;
}
@@ -1375,13 +1375,13 @@ void State::drawQuads(GLint first, GLsizei count, GLsizei primCount)
indices.push_back(base+2);
indices.push_back(base+3);
// OSG_NOTIFY(osg::NOTICE)<<" adding quad indices ("<<base<<")"<<std::endl;
// OSG_NOTICE<<" adding quad indices ("<<base<<")"<<std::endl;
}
}
// if (array!=0) return;
// OSG_NOTIFY(osg::NOTICE)<<" glDrawElements(GL_TRIANGLES, "<<numIndices<<", GL_UNSIGNED_SHORT, "<<&(indices[base])<<")"<<std::endl;
// OSG_NOTICE<<" glDrawElements(GL_TRIANGLES, "<<numIndices<<", GL_UNSIGNED_SHORT, "<<&(indices[base])<<")"<<std::endl;
glDrawElementsInstanced(GL_TRIANGLES, numIndices, GL_UNSIGNED_SHORT, &(indices[offsetFirst]), primCount);
}

View File

@@ -27,7 +27,7 @@ StateAttribute::StateAttribute()
void StateAttribute::addParent(osg::StateSet* object)
{
osg::notify(osg::DEBUG_FP)<<"Adding parent"<<getRefMutex()<<std::endl;
OSG_DEBUG_FP<<"Adding parent"<<getRefMutex()<<std::endl;
OpenThreads::ScopedPointerLock<OpenThreads::Mutex> lock(getRefMutex());
_parents.push_back(object);
@@ -44,7 +44,7 @@ void StateAttribute::removeParent(osg::StateSet* object)
void StateAttribute::setUpdateCallback(StateAttributeCallback* uc)
{
osg::notify(osg::INFO)<<"StateAttribute::Setting Update callbacks"<<std::endl;
OSG_INFO<<"StateAttribute::Setting Update callbacks"<<std::endl;
if (_updateCallback==uc) return;
@@ -56,13 +56,13 @@ void StateAttribute::setUpdateCallback(StateAttributeCallback* uc)
if (delta!=0)
{
osg::notify(osg::INFO)<<"Going to set StateAttribute parents"<<std::endl;
OSG_INFO<<"Going to set StateAttribute parents"<<std::endl;
for(ParentList::iterator itr=_parents.begin();
itr!=_parents.end();
++itr)
{
osg::notify(osg::INFO)<<" Setting StateAttribute parent"<<std::endl;
OSG_INFO<<" Setting StateAttribute parent"<<std::endl;
(*itr)->setNumChildrenRequiringUpdateTraversal((*itr)->getNumChildrenRequiringUpdateTraversal()+delta);
}
@@ -71,7 +71,7 @@ void StateAttribute::setUpdateCallback(StateAttributeCallback* uc)
void StateAttribute::setEventCallback(StateAttributeCallback* ec)
{
osg::notify(osg::INFO)<<"StateAttribute::Setting Event callbacks"<<std::endl;
OSG_INFO<<"StateAttribute::Setting Event callbacks"<<std::endl;
if (_eventCallback==ec) return;

View File

@@ -237,11 +237,11 @@ void StateSet::computeDataVariance()
if (dynamic)
{
osg::notify(osg::NOTICE)<<"StateSet::computeDataVariance setting to DYNAMIC"<<std::endl;
OSG_NOTICE<<"StateSet::computeDataVariance setting to DYNAMIC"<<std::endl;
}
else
{
osg::notify(osg::NOTICE)<<"StateSet::computeDataVariance to STATIC"<<std::endl;
OSG_NOTICE<<"StateSet::computeDataVariance to STATIC"<<std::endl;
}
#endif
@@ -254,7 +254,7 @@ void StateSet::computeDataVariance()
void StateSet::addParent(osg::Object* object)
{
// osg::notify(osg::DEBUG_FP)<<"Adding parent"<<std::endl;
// OSG_DEBUG_FP<<"Adding parent"<<std::endl;
OpenThreads::ScopedPointerLock<OpenThreads::Mutex> lock(getRefMutex());
_parents.push_back(object);
@@ -787,17 +787,17 @@ void StateSet::setMode(StateAttribute::GLMode mode, StateAttribute::GLModeValue
{
if (getTextureGLModeSet().isTextureMode(mode))
{
notify(NOTICE)<<"Warning: texture mode '"<<mode<<"'passed to setMode(mode,value), "<<std::endl;
notify(NOTICE)<<" assuming setTextureMode(unit=0,mode,value) instead."<<std::endl;
notify(NOTICE)<<" please change calling code to use appropriate call."<<std::endl;
OSG_NOTICE<<"Warning: texture mode '"<<mode<<"'passed to setMode(mode,value), "<<std::endl;
OSG_NOTICE<<" assuming setTextureMode(unit=0,mode,value) instead."<<std::endl;
OSG_NOTICE<<" please change calling code to use appropriate call."<<std::endl;
setTextureMode(0,mode,value);
}
else if (mode == GL_COLOR_MATERIAL)
{
notify(NOTICE)<<"Error: Setting mode 'GL_COLOR_MATERIAL' via osg::StateSet::setMode(mode,value) ignored.\n";
notify(NOTICE)<<" The mode 'GL_COLOR_MATERIAL' is set by the osg::Material StateAttribute.\n";
notify(NOTICE)<<" Setting this mode would confuse osg's State tracking."<<std::endl;
OSG_NOTICE<<"Error: Setting mode 'GL_COLOR_MATERIAL' via osg::StateSet::setMode(mode,value) ignored.\n";
OSG_NOTICE<<" The mode 'GL_COLOR_MATERIAL' is set by the osg::Material StateAttribute.\n";
OSG_NOTICE<<" Setting this mode would confuse osg's State tracking."<<std::endl;
}
else
{
@@ -809,17 +809,17 @@ void StateSet::removeMode(StateAttribute::GLMode mode)
{
if (getTextureGLModeSet().isTextureMode(mode))
{
notify(NOTICE)<<"Warning: texture mode '"<<mode<<"'passed to setModeToInherit(mode), "<<std::endl;
notify(NOTICE)<<" assuming setTextureModeToInherit(unit=0,mode) instead."<<std::endl;
notify(NOTICE)<<" please change calling code to use appropriate call."<<std::endl;
OSG_NOTICE<<"Warning: texture mode '"<<mode<<"'passed to setModeToInherit(mode), "<<std::endl;
OSG_NOTICE<<" assuming setTextureModeToInherit(unit=0,mode) instead."<<std::endl;
OSG_NOTICE<<" please change calling code to use appropriate call."<<std::endl;
removeTextureMode(0,mode);
}
else if (mode == GL_COLOR_MATERIAL)
{
notify(NOTICE)<<"Error: Setting mode 'GL_COLOR_MATERIAL' via osg::StateSet::removeMode(mode) ignored.\n";
notify(NOTICE)<<" The mode 'GL_COLOR_MATERIAL' is set by the osg::Material StateAttribute.\n";
notify(NOTICE)<<" Setting this mode would confuse osg's State tracking."<<std::endl;
OSG_NOTICE<<"Error: Setting mode 'GL_COLOR_MATERIAL' via osg::StateSet::removeMode(mode) ignored.\n";
OSG_NOTICE<<" The mode 'GL_COLOR_MATERIAL' is set by the osg::Material StateAttribute.\n";
OSG_NOTICE<<" Setting this mode would confuse osg's State tracking."<<std::endl;
}
else
{
@@ -836,9 +836,9 @@ StateAttribute::GLModeValue StateSet::getMode(StateAttribute::GLMode mode) const
}
else
{
notify(NOTICE)<<"Warning: texture mode '"<<mode<<"'passed to getMode(mode), "<<std::endl;
notify(NOTICE)<<" assuming getTextureMode(unit=0,mode) instead."<<std::endl;
notify(NOTICE)<<" please change calling code to use appropriate call."<<std::endl;
OSG_NOTICE<<"Warning: texture mode '"<<mode<<"'passed to getMode(mode), "<<std::endl;
OSG_NOTICE<<" assuming getTextureMode(unit=0,mode) instead."<<std::endl;
OSG_NOTICE<<" please change calling code to use appropriate call."<<std::endl;
return getTextureMode(0,mode);
}
@@ -854,9 +854,9 @@ void StateSet::setAttribute(StateAttribute *attribute, StateAttribute::OverrideV
}
else
{
notify(NOTICE)<<"Warning: texture attribute '"<<attribute->className()<<"'passed to setAttribute(attr,value), "<<std::endl;
notify(NOTICE)<<" assuming setTextureAttribute(unit=0,attr,value) instead."<<std::endl;
notify(NOTICE)<<" please change calling code to use appropriate call."<<std::endl;
OSG_NOTICE<<"Warning: texture attribute '"<<attribute->className()<<"'passed to setAttribute(attr,value), "<<std::endl;
OSG_NOTICE<<" assuming setTextureAttribute(unit=0,attr,value) instead."<<std::endl;
OSG_NOTICE<<" please change calling code to use appropriate call."<<std::endl;
setTextureAttribute(0,attribute,value);
}
@@ -881,9 +881,9 @@ void StateSet::setAttributeAndModes(StateAttribute *attribute, StateAttribute::G
}
else
{
notify(NOTICE)<<"Warning: texture attribute '"<<attribute->className()<<"' passed to setAttributeAndModes(attr,value), "<<std::endl;
notify(NOTICE)<<" assuming setTextureAttributeAndModes(unit=0,attr,value) instead."<<std::endl;
notify(NOTICE)<<" please change calling code to use appropriate call."<<std::endl;
OSG_NOTICE<<"Warning: texture attribute '"<<attribute->className()<<"' passed to setAttributeAndModes(attr,value), "<<std::endl;
OSG_NOTICE<<" assuming setTextureAttributeAndModes(unit=0,attr,value) instead."<<std::endl;
OSG_NOTICE<<" please change calling code to use appropriate call."<<std::endl;
setTextureAttributeAndModes(0,attribute,value);
}
@@ -1107,9 +1107,9 @@ void StateSet::setTextureMode(unsigned int unit,StateAttribute::GLMode mode, Sta
}
else
{
notify(NOTICE)<<"Warning: non-texture mode '"<<mode<<"'passed to setTextureMode(unit,mode,value), "<<std::endl;
notify(NOTICE)<<" assuming setMode(mode,value) instead."<<std::endl;
notify(NOTICE)<<" please change calling code to use appropriate call."<<std::endl;
OSG_NOTICE<<"Warning: non-texture mode '"<<mode<<"'passed to setTextureMode(unit,mode,value), "<<std::endl;
OSG_NOTICE<<" assuming setMode(mode,value) instead."<<std::endl;
OSG_NOTICE<<" please change calling code to use appropriate call."<<std::endl;
setMode(mode,value);
}
@@ -1124,9 +1124,9 @@ void StateSet::removeTextureMode(unsigned int unit,StateAttribute::GLMode mode)
}
else
{
notify(NOTICE)<<"Warning: non-texture mode '"<<mode<<"'passed to setTextureModeToInherit(unit,mode), "<<std::endl;
notify(NOTICE)<<" assuming setModeToInherit(unit=0,mode) instead."<<std::endl;
notify(NOTICE)<<" please change calling code to use appropriate call."<<std::endl;
OSG_NOTICE<<"Warning: non-texture mode '"<<mode<<"'passed to setTextureModeToInherit(unit,mode), "<<std::endl;
OSG_NOTICE<<" assuming setModeToInherit(unit=0,mode) instead."<<std::endl;
OSG_NOTICE<<" please change calling code to use appropriate call."<<std::endl;
removeMode(mode);
}
@@ -1142,9 +1142,9 @@ StateAttribute::GLModeValue StateSet::getTextureMode(unsigned int unit,StateAttr
}
else
{
notify(NOTICE)<<"Warning: non-texture mode '"<<mode<<"'passed to geTexturetMode(unit,mode), "<<std::endl;
notify(NOTICE)<<" assuming getMode(mode) instead."<<std::endl;
notify(NOTICE)<<" please change calling code to use appropriate call."<<std::endl;
OSG_NOTICE<<"Warning: non-texture mode '"<<mode<<"'passed to geTexturetMode(unit,mode), "<<std::endl;
OSG_NOTICE<<" assuming getMode(mode) instead."<<std::endl;
OSG_NOTICE<<" please change calling code to use appropriate call."<<std::endl;
return getMode(mode);
}
@@ -1160,9 +1160,9 @@ void StateSet::setTextureAttribute(unsigned int unit,StateAttribute *attribute,
}
else
{
notify(NOTICE)<<"Warning: texture attribute '"<<attribute->className()<<"' passed to setTextureAttribute(unit,attr,value), "<<std::endl;
notify(NOTICE)<<" assuming setAttribute(attr,value) instead."<<std::endl;
notify(NOTICE)<<" please change calling code to use appropriate call."<<std::endl;
OSG_NOTICE<<"Warning: texture attribute '"<<attribute->className()<<"' passed to setTextureAttribute(unit,attr,value), "<<std::endl;
OSG_NOTICE<<" assuming setAttribute(attr,value) instead."<<std::endl;
OSG_NOTICE<<" please change calling code to use appropriate call."<<std::endl;
setAttribute(attribute,value);
}
}
@@ -1188,9 +1188,9 @@ void StateSet::setTextureAttributeAndModes(unsigned int unit,StateAttribute *att
}
else
{
notify(NOTICE)<<"Warning: non texture attribute '"<<attribute->className()<<"' passed to setTextureAttributeAndModes(unit,attr,value), "<<std::endl;
notify(NOTICE)<<" assuming setAttributeAndModes(attr,value) instead."<<std::endl;
notify(NOTICE)<<" please change calling code to use appropriate call."<<std::endl;
OSG_NOTICE<<"Warning: non texture attribute '"<<attribute->className()<<"' passed to setTextureAttributeAndModes(unit,attr,value), "<<std::endl;
OSG_NOTICE<<" assuming setAttributeAndModes(attr,value) instead."<<std::endl;
OSG_NOTICE<<" please change calling code to use appropriate call."<<std::endl;
setAttribute(attribute,value);
}
}
@@ -1334,7 +1334,7 @@ void StateSet::compileGLObjects(State& state) const
itr->second.first->compileGLObjects(state);
if (checkForGLErrors && state.checkGLErrors("StateSet::compileGLObejcts() compiling attribute"))
{
osg::notify(osg::NOTICE)<<" GL Error when compiling "<<itr->second.first->className()<<std::endl;
OSG_NOTICE<<" GL Error when compiling "<<itr->second.first->className()<<std::endl;
}
}
@@ -1349,7 +1349,7 @@ void StateSet::compileGLObjects(State& state) const
itr->second.first->compileGLObjects(state);
if (checkForGLErrors && state.checkGLErrors("StateSet::compileGLObejcts() compiling texture attribute"))
{
osg::notify(osg::NOTICE)<<" GL Error when compiling "<<itr->second.first->className()<<std::endl;
OSG_NOTICE<<" GL Error when compiling "<<itr->second.first->className()<<std::endl;
}
}
}
@@ -1640,7 +1640,7 @@ const StateSet::RefAttributePair* StateSet::getAttributePair(const AttributeList
void StateSet::setUpdateCallback(Callback* ac)
{
//osg::notify(osg::INFO)<<"Setting StateSet callbacks"<<std::endl;
//OSG_INFO<<"Setting StateSet callbacks"<<std::endl;
if (_updateCallback==ac) return;
@@ -1652,13 +1652,13 @@ void StateSet::setUpdateCallback(Callback* ac)
if (delta!=0 && _numChildrenRequiringUpdateTraversal==0)
{
//osg::notify(osg::INFO)<<"Going to set StateSet parents"<<std::endl;
//OSG_INFO<<"Going to set StateSet parents"<<std::endl;
for(ParentList::iterator itr=_parents.begin();
itr!=_parents.end();
++itr)
{
//osg::notify(osg::INFO)<<"Setting StateSet parent"<<std::endl;
//OSG_INFO<<"Setting StateSet parent"<<std::endl;
osg::Drawable* drawable = dynamic_cast<osg::Drawable*>(*itr);
if (drawable)
@@ -1679,7 +1679,7 @@ void StateSet::setUpdateCallback(Callback* ac)
void StateSet::runUpdateCallbacks(osg::NodeVisitor* nv)
{
//osg::notify(osg::INFO)<<"Running StateSet callbacks"<<std::endl;
//OSG_INFO<<"Running StateSet callbacks"<<std::endl;
if (_updateCallback.valid()) (*_updateCallback)(this,nv);

View File

@@ -69,7 +69,7 @@ bool Stats::setAttribute(int frameNumber, const std::string& attributeName, doub
int index = getIndex(frameNumber);
if (index<0)
{
osg::notify(osg::NOTICE)<<"Failed to assing valid index for Stats::setAttribute("<<frameNumber<<","<<attributeName<<","<<value<<")"<<std::endl;
OSG_NOTICE<<"Failed to assing valid index for Stats::setAttribute("<<frameNumber<<","<<attributeName<<","<<value<<")"<<std::endl;
return false;
}

View File

@@ -153,7 +153,7 @@ void StencilTwoSided::Extensions::glActiveStencilFace(GLenum face) const
}
else
{
notify(WARN)<<"Error: glActiveStencilFace not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glActiveStencilFace not supported by OpenGL driver"<<std::endl;
}
}

View File

@@ -105,7 +105,7 @@ void TexEnvCombine::apply(State& state) const
glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
}
#else
osg::notify(osg::NOTICE)<<"Warning: TexEnvCombine::apply(State&) - not supported."<<std::endl;
OSG_NOTICE<<"Warning: TexEnvCombine::apply(State&) - not supported."<<std::endl;
#endif
}
void TexEnvCombine::setCombine_RGB(GLint cm) { _combine_RGB = cm; }
@@ -127,7 +127,7 @@ static GLint Valid_Operand_Alpha(GLint op, const char* functionName)
{
if (op==TexEnvCombine::SRC_ALPHA || op==TexEnvCombine::ONE_MINUS_SRC_ALPHA) return op;
notify(WARN)<<"Warning:: TexEnvCombine::"<<functionName<<"("<<op<<") invalid parameter value,"<<std::endl<<
OSG_WARN<<"Warning:: TexEnvCombine::"<<functionName<<"("<<op<<") invalid parameter value,"<<std::endl<<
" must be SRC_ALPHA or ONE_MINUS_SRC_ALPHA, resetting to SRC_ALPHA."<<std::endl;
return TexEnvCombine::SRC_ALPHA;
}

View File

@@ -39,7 +39,7 @@ void TexGen::setPlane(Coord which, const Plane& 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<<")"<<std::endl; break;
default : OSG_WARN<<"Error: invalid 'which' passed TexGen::setPlane("<<(unsigned int)which<<","<<plane<<")"<<std::endl; break;
}
}
@@ -51,7 +51,7 @@ const Plane& TexGen::getPlane(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)"<<std::endl; return _plane_r;
default : OSG_WARN<<"Error: invalid 'which' passed TexGen::getPlane(which)"<<std::endl; return _plane_r;
}
}
@@ -63,7 +63,7 @@ Plane& TexGen::getPlane(Coord which)
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)"<<std::endl; return _plane_r;
default : OSG_WARN<<"Error: invalid 'which' passed TexGen::getPlane(which)"<<std::endl; return _plane_r;
}
}
@@ -126,6 +126,6 @@ void TexGen::apply(State&) const
glTexGeni( GL_T, GL_TEXTURE_GEN_MODE, _mode );
}
#else
osg::notify(osg::NOTICE)<<"Warning: TexGen::apply(State&) - not supported."<<std::endl;
OSG_NOTICE<<"Warning: TexGen::apply(State&) - not supported."<<std::endl;
#endif
}

View File

@@ -44,6 +44,6 @@ void TexMat::apply(State& state) const
glMatrixMode( GL_MODELVIEW );
#else
osg::notify(osg::NOTICE)<<"Warning: TexMat::apply(State&) - not supported."<<std::endl;
OSG_NOTICE<<"Warning: TexMat::apply(State&) - not supported."<<std::endl;
#endif
}

View File

@@ -72,7 +72,7 @@ unsigned int Texture::getMinimumNumberOfTextureObjectsToRetainInCache()
Texture::TextureObject::~TextureObject()
{
// osg::notify(osg::NOTICE)<<"Texture::TextureObject::~TextureObject() "<<this<<std::endl;
// OSG_NOTICE<<"Texture::TextureObject::~TextureObject() "<<this<<std::endl;
}
void Texture::TextureObject::bind()
@@ -144,7 +144,7 @@ void Texture::TextureProfile::computeSize()
}
}
// osg::notify(osg::NOTICE)<<"TO ("<<_width<<", "<<_height<<", "<<_depth<<") size="<<_size<<" numBitsPerTexel="<<numBitsPerTexel<<std::endl;
// OSG_NOTICE<<"TO ("<<_width<<", "<<_height<<", "<<_depth<<") size="<<_size<<" numBitsPerTexel="<<numBitsPerTexel<<std::endl;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -164,10 +164,10 @@ Texture::TextureObjectSet::TextureObjectSet(TextureObjectManager* parent, const
Texture::TextureObjectSet::~TextureObjectSet()
{
#if 0
osg::notify(osg::NOTICE)<<"TextureObjectSet::~TextureObjectSet(), _numOfTextureObjects="<<_numOfTextureObjects<<std::endl;
osg::notify(osg::NOTICE)<<" _orphanedTextureObjects = "<<_orphanedTextureObjects.size()<<std::endl;
osg::notify(osg::NOTICE)<<" _head = "<<_head<<std::endl;
osg::notify(osg::NOTICE)<<" _tail = "<<_tail<<std::endl;
OSG_NOTICE<<"TextureObjectSet::~TextureObjectSet(), _numOfTextureObjects="<<_numOfTextureObjects<<std::endl;
OSG_NOTICE<<" _orphanedTextureObjects = "<<_orphanedTextureObjects.size()<<std::endl;
OSG_NOTICE<<" _head = "<<_head<<std::endl;
OSG_NOTICE<<" _tail = "<<_tail<<std::endl;
#endif
}
@@ -176,7 +176,7 @@ bool Texture::TextureObjectSet::checkConsistency() const
#ifndef CHECK_CONSISTENCY
return true;
#else
// osg::notify(osg::NOTICE)<<"TextureObjectSet::checkConsistency()"<<std::endl;
// OSG_NOTICE<<"TextureObjectSet::checkConsistency()"<<std::endl;
// check consistency of linked list.
unsigned int numInList = 0;
Texture::TextureObject* to = _head;
@@ -188,7 +188,7 @@ bool Texture::TextureObjectSet::checkConsistency() const
{
if ((to->_next)->_previous != to)
{
osg::notify(osg::NOTICE)<<"Texture::TextureObjectSet::checkConsistency() : Error (to->_next)->_previous != to "<<std::endl;
OSG_NOTICE<<"Texture::TextureObjectSet::checkConsistency() : Error (to->_next)->_previous != to "<<std::endl;
return false;
}
}
@@ -196,7 +196,7 @@ bool Texture::TextureObjectSet::checkConsistency() const
{
if (_tail != to)
{
osg::notify(osg::NOTICE)<<"Texture::TextureObjectSet::checkConsistency() : Error _tail != to"<<std::endl;
OSG_NOTICE<<"Texture::TextureObjectSet::checkConsistency() : Error _tail != to"<<std::endl;
return false;
}
}
@@ -207,11 +207,11 @@ bool Texture::TextureObjectSet::checkConsistency() const
unsigned int totalNumber = numInList + _orphanedTextureObjects.size();
if (totalNumber != _numOfTextureObjects)
{
osg::notify(osg::NOTICE)<<"Error numInList + _orphanedTextureObjects.size() != _numOfTextureObjects"<<std::endl;
osg::notify(osg::NOTICE)<<" numInList = "<<numInList<<std::endl;
osg::notify(osg::NOTICE)<<" _orphanedTextureObjects.size() = "<<_orphanedTextureObjects.size()<<std::endl;
osg::notify(osg::NOTICE)<<" _pendingOrphanedTextureObjects.size() = "<<_pendingOrphanedTextureObjects.size()<<std::endl;
osg::notify(osg::NOTICE)<<" _numOfTextureObjects = "<<_numOfTextureObjects<<std::endl;
OSG_NOTICE<<"Error numInList + _orphanedTextureObjects.size() != _numOfTextureObjects"<<std::endl;
OSG_NOTICE<<" numInList = "<<numInList<<std::endl;
OSG_NOTICE<<" _orphanedTextureObjects.size() = "<<_orphanedTextureObjects.size()<<std::endl;
OSG_NOTICE<<" _pendingOrphanedTextureObjects.size() = "<<_pendingOrphanedTextureObjects.size()<<std::endl;
OSG_NOTICE<<" _numOfTextureObjects = "<<_numOfTextureObjects<<std::endl;
return false;
}
@@ -221,7 +221,7 @@ bool Texture::TextureObjectSet::checkConsistency() const
void Texture::TextureObjectSet::handlePendingOrphandedTextureObjects()
{
// osg::notify(osg::NOTICE)<<"handlePendingOrphandedTextureObjects()"<<_pendingOrphanedTextureObjects.size()<<std::endl;
// OSG_NOTICE<<"handlePendingOrphandedTextureObjects()"<<_pendingOrphanedTextureObjects.size()<<std::endl;
if (_pendingOrphanedTextureObjects.empty()) return;
@@ -238,10 +238,10 @@ void Texture::TextureObjectSet::handlePendingOrphandedTextureObjects()
remove(to);
#if 0
osg::notify(osg::NOTICE)<<" HPOTO after _head = "<<_head<<std::endl;
osg::notify(osg::NOTICE)<<" HPOTO after _tail = "<<_tail<<std::endl;
osg::notify(osg::NOTICE)<<" HPOTO after to->_previous = "<<to->_previous<<std::endl;
osg::notify(osg::NOTICE)<<" HPOTO after to->_next = "<<to->_next<<std::endl;
OSG_NOTICE<<" HPOTO after _head = "<<_head<<std::endl;
OSG_NOTICE<<" HPOTO after _tail = "<<_tail<<std::endl;
OSG_NOTICE<<" HPOTO after to->_previous = "<<to->_previous<<std::endl;
OSG_NOTICE<<" HPOTO after to->_next = "<<to->_next<<std::endl;
#endif
}
@@ -259,7 +259,7 @@ void Texture::TextureObjectSet::handlePendingOrphandedTextureObjects()
void Texture::TextureObjectSet::deleteAllTextureObjects()
{
// osg::notify(osg::NOTICE)<<"Texture::TextureObjectSet::deleteAllTextureObjects()"<<std::endl;
// OSG_NOTICE<<"Texture::TextureObjectSet::deleteAllTextureObjects()"<<std::endl;
// move the pending orhpans into the orhans list
handlePendingOrphandedTextureObjects();
@@ -285,12 +285,12 @@ void Texture::TextureObjectSet::deleteAllTextureObjects()
// now do the actual delete.
flushAllDeletedTextureObjects();
// osg::notify(osg::NOTICE)<<"done GLBufferObjectSet::deleteAllGLBufferObjects()"<<std::endl;
// OSG_NOTICE<<"done GLBufferObjectSet::deleteAllGLBufferObjects()"<<std::endl;
}
void Texture::TextureObjectSet::discardAllTextureObjects()
{
// osg::notify(osg::NOTICE)<<"Texture::TextureObjectSet::discardAllTextureObjects()."<<std::endl;
// OSG_NOTICE<<"Texture::TextureObjectSet::discardAllTextureObjects()."<<std::endl;
TextureObject* to = _head;
while(to!=0)
@@ -325,7 +325,7 @@ void Texture::TextureObjectSet::discardAllTextureObjects()
void Texture::TextureObjectSet::flushAllDeletedTextureObjects()
{
// osg::notify(osg::NOTICE)<<"Texture::TextureObjectSet::flushAllDeletedTextureObjects()"<<std::endl;
// OSG_NOTICE<<"Texture::TextureObjectSet::flushAllDeletedTextureObjects()"<<std::endl;
for(TextureObjectList::iterator itr = _orphanedTextureObjects.begin();
itr != _orphanedTextureObjects.end();
@@ -334,7 +334,7 @@ void Texture::TextureObjectSet::flushAllDeletedTextureObjects()
GLuint id = (*itr)->id();
// osg::notify(osg::NOTICE)<<" Deleting textureobject ptr="<<itr->get()<<" id="<<id<<std::endl;
// OSG_NOTICE<<" Deleting textureobject ptr="<<itr->get()<<" id="<<id<<std::endl;
glDeleteTextures( 1L, &id);
}
@@ -351,7 +351,7 @@ void Texture::TextureObjectSet::flushAllDeletedTextureObjects()
void Texture::TextureObjectSet::discardAllDeletedTextureObjects()
{
// osg::notify(osg::NOTICE)<<"Texture::TextureObjectSet::discardAllDeletedTextureObjects()"<<std::endl;
// OSG_NOTICE<<"Texture::TextureObjectSet::discardAllDeletedTextureObjects()"<<std::endl;
// clean up the pending orphans.
handlePendingOrphandedTextureObjects();
@@ -374,7 +374,7 @@ void Texture::TextureObjectSet::discardAllDeletedTextureObjects()
void Texture::TextureObjectSet::flushDeletedTextureObjects(double currentTime, double& availableTime)
{
// osg::notify(osg::NOTICE)<<"Texture::TextureObjectSet::flushDeletedTextureObjects(..)"<<std::endl;
// OSG_NOTICE<<"Texture::TextureObjectSet::flushDeletedTextureObjects(..)"<<std::endl;
// if nothing to delete return
if (_orphanedTextureObjects.empty()) return;
@@ -399,15 +399,15 @@ void Texture::TextureObjectSet::flushDeletedTextureObjects(double currentTime, d
GLuint id = (*itr)->id();
// osg::notify(osg::NOTICE)<<" Deleting textureobject ptr="<<itr->get()<<" id="<<id<<std::endl;
// OSG_NOTICE<<" Deleting textureobject ptr="<<itr->get()<<" id="<<id<<std::endl;
glDeleteTextures( 1L, &id);
++numDeleted;
}
// osg::notify(osg::NOTICE)<<"Size before = "<<_orphanedTextureObjects.size();
// OSG_NOTICE<<"Size before = "<<_orphanedTextureObjects.size();
_orphanedTextureObjects.erase(_orphanedTextureObjects.begin(), itr);
// osg::notify(osg::NOTICE)<<", after = "<<_orphanedTextureObjects.size()<<" numDeleted = "<<numDeleted<<std::endl;
// OSG_NOTICE<<", after = "<<_orphanedTextureObjects.size()<<" numDeleted = "<<numDeleted<<std::endl;
// update the number of TO's in this TextureObjectSet
_numOfTextureObjects -= numDeleted;
@@ -454,7 +454,7 @@ Texture::TextureObject* Texture::TextureObjectSet::takeFromOrphans(Texture* text
// place at back of active list
addToBack(to.get());
// osg::notify(osg::INFO)<<"Reusing orhpahned TextureObject, _numOfTextureObjects="<<_numOfTextureObjects<<std::endl;
// OSG_INFO<<"Reusing orhpahned TextureObject, _numOfTextureObjects="<<_numOfTextureObjects<<std::endl;
return to.release();
}
@@ -493,11 +493,11 @@ Texture::TextureObject* Texture::TextureObjectSet::takeOrGenerate(Texture* textu
if (original_texture.valid())
{
original_texture->setTextureObject(_contextID,0);
osg::notify(osg::INFO)<<"TextureObjectSet="<<this<<": Reusing an active TextureObject "<<to.get()<<" _numOfTextureObjects="<<_numOfTextureObjects<<" width="<<_profile._width<<" height="<<_profile._height<<std::endl;
OSG_INFO<<"TextureObjectSet="<<this<<": Reusing an active TextureObject "<<to.get()<<" _numOfTextureObjects="<<_numOfTextureObjects<<" width="<<_profile._width<<" height="<<_profile._height<<std::endl;
}
else
{
osg::notify(osg::INFO)<<"Reusing a recently orphaned active TextureObject "<<to.get()<<std::endl;
OSG_INFO<<"Reusing a recently orphaned active TextureObject "<<to.get()<<std::endl;
}
moveToBack(to.get());
@@ -524,7 +524,7 @@ Texture::TextureObject* Texture::TextureObjectSet::takeOrGenerate(Texture* textu
addToBack(to);
osg::notify(osg::INFO)<<"Created new TextureObject, _numOfTextureObjects "<<_numOfTextureObjects<<std::endl;
OSG_INFO<<"Created new TextureObject, _numOfTextureObjects "<<_numOfTextureObjects<<std::endl;
return to;
}
@@ -532,11 +532,11 @@ Texture::TextureObject* Texture::TextureObjectSet::takeOrGenerate(Texture* textu
void Texture::TextureObjectSet::moveToBack(Texture::TextureObject* to)
{
#if 0
osg::notify(osg::NOTICE)<<"TextureObjectSet::moveToBack("<<to<<")"<<std::endl;
osg::notify(osg::NOTICE)<<" before _head = "<<_head<<std::endl;
osg::notify(osg::NOTICE)<<" before _tail = "<<_tail<<std::endl;
osg::notify(osg::NOTICE)<<" before to->_previous = "<<to->_previous<<std::endl;
osg::notify(osg::NOTICE)<<" before to->_next = "<<to->_next<<std::endl;
OSG_NOTICE<<"TextureObjectSet::moveToBack("<<to<<")"<<std::endl;
OSG_NOTICE<<" before _head = "<<_head<<std::endl;
OSG_NOTICE<<" before _tail = "<<_tail<<std::endl;
OSG_NOTICE<<" before to->_previous = "<<to->_previous<<std::endl;
OSG_NOTICE<<" before to->_next = "<<to->_next<<std::endl;
#endif
to->_frameLastUsed = _parent->getFrameNumber();
@@ -547,7 +547,7 @@ void Texture::TextureObjectSet::moveToBack(Texture::TextureObject* to)
// if no tail exists then assign 'to' as tail and head
if (_tail==0)
{
osg::notify(osg::NOTICE)<<"Error ***************** Should not get here !!!!!!!!!"<<std::endl;
OSG_NOTICE<<"Error ***************** Should not get here !!!!!!!!!"<<std::endl;
_head = to;
_tail = to;
return;
@@ -555,7 +555,7 @@ void Texture::TextureObjectSet::moveToBack(Texture::TextureObject* to)
if (to->_next==0)
{
osg::notify(osg::NOTICE)<<"Error ***************** Should not get here either !!!!!!!!!"<<std::endl;
OSG_NOTICE<<"Error ***************** Should not get here either !!!!!!!!!"<<std::endl;
return;
}
@@ -583,10 +583,10 @@ void Texture::TextureObjectSet::moveToBack(Texture::TextureObject* to)
_tail = to;
#if 0
osg::notify(osg::NOTICE)<<" m2B after _head = "<<_head<<std::endl;
osg::notify(osg::NOTICE)<<" m2B after _tail = "<<_tail<<std::endl;
osg::notify(osg::NOTICE)<<" m2B after to->_previous = "<<to->_previous<<std::endl;
osg::notify(osg::NOTICE)<<" m2B after to->_next = "<<to->_next<<std::endl;
OSG_NOTICE<<" m2B after _head = "<<_head<<std::endl;
OSG_NOTICE<<" m2B after _tail = "<<_tail<<std::endl;
OSG_NOTICE<<" m2B after to->_previous = "<<to->_previous<<std::endl;
OSG_NOTICE<<" m2B after to->_next = "<<to->_next<<std::endl;
#endif
checkConsistency();
}
@@ -594,11 +594,11 @@ void Texture::TextureObjectSet::moveToBack(Texture::TextureObject* to)
void Texture::TextureObjectSet::addToBack(Texture::TextureObject* to)
{
#if 0
osg::notify(osg::NOTICE)<<"TextureObjectSet::addToBack("<<to<<")"<<std::endl;
osg::notify(osg::NOTICE)<<" before _head = "<<_head<<std::endl;
osg::notify(osg::NOTICE)<<" before _tail = "<<_tail<<std::endl;
osg::notify(osg::NOTICE)<<" before to->_previous = "<<to->_previous<<std::endl;
osg::notify(osg::NOTICE)<<" before to->_next = "<<to->_next<<std::endl;
OSG_NOTICE<<"TextureObjectSet::addToBack("<<to<<")"<<std::endl;
OSG_NOTICE<<" before _head = "<<_head<<std::endl;
OSG_NOTICE<<" before _tail = "<<_tail<<std::endl;
OSG_NOTICE<<" before to->_previous = "<<to->_previous<<std::endl;
OSG_NOTICE<<" before to->_next = "<<to->_next<<std::endl;
#endif
if (to->_previous !=0 || to->_next !=0)
@@ -616,17 +616,17 @@ void Texture::TextureObjectSet::addToBack(Texture::TextureObject* to)
_tail = to;
}
#if 0
osg::notify(osg::NOTICE)<<" a2B after _head = "<<_head<<std::endl;
osg::notify(osg::NOTICE)<<" a2B after _tail = "<<_tail<<std::endl;
osg::notify(osg::NOTICE)<<" a2B after to->_previous = "<<to->_previous<<std::endl;
osg::notify(osg::NOTICE)<<" a2B after to->_next = "<<to->_next<<std::endl;
OSG_NOTICE<<" a2B after _head = "<<_head<<std::endl;
OSG_NOTICE<<" a2B after _tail = "<<_tail<<std::endl;
OSG_NOTICE<<" a2B after to->_previous = "<<to->_previous<<std::endl;
OSG_NOTICE<<" a2B after to->_next = "<<to->_next<<std::endl;
#endif
checkConsistency();
}
void Texture::TextureObjectSet::orphan(Texture::TextureObject* to)
{
// osg::notify(osg::NOTICE)<<"TextureObjectSet::orphan("<<to<<")"<<std::endl;
// OSG_NOTICE<<"TextureObjectSet::orphan("<<to<<")"<<std::endl;
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex);
@@ -641,8 +641,8 @@ void Texture::TextureObjectSet::orphan(Texture::TextureObject* to)
_pendingOrphanedTextureObjects.push_back(to);
#if 0
osg::notify(osg::NOTICE)<<"TextureObjectSet::orphan("<<to<<") _pendingOrphanedTextureObjects.size()="<<_pendingOrphanedTextureObjects.size()<<std::endl;
osg::notify(osg::NOTICE)<<" _orphanedTextureObjects.size()="<<_orphanedTextureObjects.size()<<std::endl;
OSG_NOTICE<<"TextureObjectSet::orphan("<<to<<") _pendingOrphanedTextureObjects.size()="<<_pendingOrphanedTextureObjects.size()<<std::endl;
OSG_NOTICE<<" _orphanedTextureObjects.size()="<<_orphanedTextureObjects.size()<<std::endl;
#endif
}
@@ -712,7 +712,7 @@ void Texture::TextureObjectManager::setMaxTexturePoolSize(unsigned int size)
if (size<_currTexturePoolSize)
{
osg::notify(osg::NOTICE)<<"Warning: new MaxTexturePoolSize="<<size<<" is smaller than current TexturePoolSize="<<_currTexturePoolSize<<std::endl;
OSG_NOTICE<<"Warning: new MaxTexturePoolSize="<<size<<" is smaller than current TexturePoolSize="<<_currTexturePoolSize<<std::endl;
}
_maxTexturePoolSize = size;
@@ -772,7 +772,7 @@ void Texture::TextureObjectManager::handlePendingOrphandedTextureObjects()
void Texture::TextureObjectManager::deleteAllTextureObjects()
{
// osg::notify(osg::NOTICE)<<"Texture::TextureObjectManager::deleteAllTextureObjects() _contextID="<<_contextID<<std::endl;
// OSG_NOTICE<<"Texture::TextureObjectManager::deleteAllTextureObjects() _contextID="<<_contextID<<std::endl;
ElapsedTime elapsedTime(&(getDeleteTime()));
@@ -786,7 +786,7 @@ void Texture::TextureObjectManager::deleteAllTextureObjects()
void Texture::TextureObjectManager::discardAllTextureObjects()
{
// osg::notify(osg::NOTICE)<<"Texture::TextureObjectManager::discardAllTextureObjects() _contextID="<<_contextID<<" _numActiveTextureObjects="<<_numActiveTextureObjects<<std::endl;
// OSG_NOTICE<<"Texture::TextureObjectManager::discardAllTextureObjects() _contextID="<<_contextID<<" _numActiveTextureObjects="<<_numActiveTextureObjects<<std::endl;
for(TextureSetMap::iterator itr = _textureSetMap.begin();
itr != _textureSetMap.end();
@@ -798,7 +798,7 @@ void Texture::TextureObjectManager::discardAllTextureObjects()
void Texture::TextureObjectManager::flushAllDeletedTextureObjects()
{
// osg::notify(osg::NOTICE)<<"Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID="<<_contextID<<std::endl;
// OSG_NOTICE<<"Texture::TextureObjectManager::flushAllDeletedTextureObjects() _contextID="<<_contextID<<std::endl;
ElapsedTime elapsedTime(&(getDeleteTime()));
@@ -812,7 +812,7 @@ void Texture::TextureObjectManager::flushAllDeletedTextureObjects()
void Texture::TextureObjectManager::discardAllDeletedTextureObjects()
{
// osg::notify(osg::NOTICE)<<"Texture::TextureObjectManager::discardAllDeletedTextureObjects() _contextID="<<_contextID<<" _numActiveTextureObjects="<<_numActiveTextureObjects<<std::endl;
// OSG_NOTICE<<"Texture::TextureObjectManager::discardAllDeletedTextureObjects() _contextID="<<_contextID<<" _numActiveTextureObjects="<<_numActiveTextureObjects<<std::endl;
for(TextureSetMap::iterator itr = _textureSetMap.begin();
itr != _textureSetMap.end();
@@ -837,7 +837,7 @@ void Texture::TextureObjectManager::flushDeletedTextureObjects(double currentTim
void Texture::TextureObjectManager::releaseTextureObject(Texture::TextureObject* to)
{
if (to->_set) to->_set->orphan(to);
else osg::notify(osg::NOTICE)<<"TextureObjectManager::releaseTextureObject(Texture::TextureObject* to) Not implemented yet"<<std::endl;
else OSG_NOTICE<<"TextureObjectManager::releaseTextureObject(Texture::TextureObject* to) Not implemented yet"<<std::endl;
}
@@ -852,11 +852,11 @@ void Texture::TextureObjectManager::newFrame(osg::FrameStamp* fs)
void Texture::TextureObjectManager::reportStats()
{
double numFrames(_numFrames==0 ? 1.0 : _numFrames);
osg::notify(osg::NOTICE)<<"TextureObjectMananger::reportStats()"<<std::endl;
osg::notify(osg::NOTICE)<<" total _numOfTextureObjects="<<_numActiveTextureObjects<<", _numOrphanedTextureObjects="<<_numOrphanedTextureObjects<<" _currTexturePoolSize="<<_currTexturePoolSize<<std::endl;
osg::notify(osg::NOTICE)<<" total _numGenerated="<<_numGenerated<<", _generateTime="<<_generateTime<<", averagePerFrame="<<_generateTime/numFrames*1000.0<<"ms"<<std::endl;
osg::notify(osg::NOTICE)<<" total _numDeleted="<<_numDeleted<<", _deleteTime="<<_deleteTime<<", averagePerFrame="<<_deleteTime/numFrames*1000.0<<"ms"<<std::endl;
osg::notify(osg::NOTICE)<<" total _numApplied="<<_numApplied<<", _applyTime="<<_applyTime<<", averagePerFrame="<<_applyTime/numFrames*1000.0<<"ms"<<std::endl;
OSG_NOTICE<<"TextureObjectMananger::reportStats()"<<std::endl;
OSG_NOTICE<<" total _numOfTextureObjects="<<_numActiveTextureObjects<<", _numOrphanedTextureObjects="<<_numOrphanedTextureObjects<<" _currTexturePoolSize="<<_currTexturePoolSize<<std::endl;
OSG_NOTICE<<" total _numGenerated="<<_numGenerated<<", _generateTime="<<_generateTime<<", averagePerFrame="<<_generateTime/numFrames*1000.0<<"ms"<<std::endl;
OSG_NOTICE<<" total _numDeleted="<<_numDeleted<<", _deleteTime="<<_deleteTime<<", averagePerFrame="<<_deleteTime/numFrames*1000.0<<"ms"<<std::endl;
OSG_NOTICE<<" total _numApplied="<<_numApplied<<", _applyTime="<<_applyTime<<", averagePerFrame="<<_applyTime/numFrames*1000.0<<"ms"<<std::endl;
}
void Texture::TextureObjectManager::resetStats()
@@ -1044,7 +1044,7 @@ void Texture::setWrap(WrapParameter which, WrapMode wrap)
case WRAP_S : _wrap_s = wrap; dirtyTextureParameters(); break;
case WRAP_T : _wrap_t = wrap; dirtyTextureParameters(); break;
case WRAP_R : _wrap_r = wrap; dirtyTextureParameters(); break;
default : notify(WARN)<<"Error: invalid 'which' passed Texture::setWrap("<<(unsigned int)which<<","<<(unsigned int)wrap<<")"<<std::endl; break;
default : OSG_WARN<<"Error: invalid 'which' passed Texture::setWrap("<<(unsigned int)which<<","<<(unsigned int)wrap<<")"<<std::endl; break;
}
}
@@ -1057,7 +1057,7 @@ Texture::WrapMode Texture::getWrap(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)"<<std::endl; return _wrap_s;
default : OSG_WARN<<"Error: invalid 'which' passed Texture::getWrap(which)"<<std::endl; return _wrap_s;
}
}
@@ -1068,7 +1068,7 @@ void Texture::setFilter(FilterParameter which, FilterMode filter)
{
case MIN_FILTER : _min_filter = filter; dirtyTextureParameters(); break;
case MAG_FILTER : _mag_filter = filter; dirtyTextureParameters(); break;
default : notify(WARN)<<"Error: invalid 'which' passed Texture::setFilter("<<(unsigned int)which<<","<<(unsigned int)filter<<")"<<std::endl; break;
default : OSG_WARN<<"Error: invalid 'which' passed Texture::setFilter("<<(unsigned int)which<<","<<(unsigned int)filter<<")"<<std::endl; break;
}
}
@@ -1079,7 +1079,7 @@ Texture::FilterMode Texture::getFilter(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)"<< std::endl; return _min_filter;
default : OSG_WARN<<"Error: invalid 'which' passed Texture::getFilter(which)"<< std::endl; return _min_filter;
}
}
@@ -1215,7 +1215,7 @@ void Texture::computeInternalFormatWithImage(const osg::Image& image) const
computeInternalFormatType();
//osg::notify(osg::NOTICE)<<"Internal format="<<std::hex<<internalFormat<<std::dec<<std::endl;
//OSG_NOTICE<<"Internal format="<<std::hex<<internalFormat<<std::dec<<std::endl;
}
void Texture::computeInternalFormatType() const
@@ -1328,7 +1328,7 @@ void Texture::getCompressedSize(GLenum internalFormat, GLint width, GLint height
blockSize = 16;
else
{
notify(WARN)<<"Texture::getCompressedSize(...) : cannot compute correct size of compressed format ("<<internalFormat<<") returning 0."<<std::endl;
OSG_WARN<<"Texture::getCompressedSize(...) : cannot compute correct size of compressed format ("<<internalFormat<<") returning 0."<<std::endl;
blockSize = 0;
}
@@ -1500,8 +1500,8 @@ void Texture::computeRequiredTextureDimensions(State& state, const osg::Image& i
for(int s=1; s<width || s<height; s <<= 1, ++numMipmapLevels) {}
}
// osg::notify(osg::NOTICE)<<"Texture::computeRequiredTextureDimensions() image.s() "<<image.s()<<" image.t()="<<image.t()<<" width="<<width<<" height="<<height<<" numMipmapLevels="<<numMipmapLevels<<std::endl;
// osg::notify(osg::NOTICE)<<" _resizeNonPowerOfTwoHint="<<_resizeNonPowerOfTwoHint<<" extensions->isNonPowerOfTwoTextureSupported(_min_filter)="<<extensions->isNonPowerOfTwoTextureSupported(_min_filter) <<std::endl;
// OSG_NOTICE<<"Texture::computeRequiredTextureDimensions() image.s() "<<image.s()<<" image.t()="<<image.t()<<" width="<<width<<" height="<<height<<" numMipmapLevels="<<numMipmapLevels<<std::endl;
// OSG_NOTICE<<" _resizeNonPowerOfTwoHint="<<_resizeNonPowerOfTwoHint<<" extensions->isNonPowerOfTwoTextureSupported(_min_filter)="<<extensions->isNonPowerOfTwoTextureSupported(_min_filter) <<std::endl;
}
bool Texture::areAllTextureObjectsLoaded() const
@@ -1522,7 +1522,7 @@ void Texture::applyTexImage2D_load(State& state, GLenum target, const Image* ima
#ifdef DO_TIMING
osg::Timer_t start_tick = osg::Timer::instance()->tick();
osg::notify(osg::NOTICE)<<"glTexImage2D pixelFormat = "<<std::hex<<image->getPixelFormat()<<std::dec<<std::endl;
OSG_NOTICE<<"glTexImage2D pixelFormat = "<<std::hex<<image->getPixelFormat()<<std::dec<<std::endl;
#endif
// get the contextID (user defined ID of 0 upwards) for the
@@ -1542,7 +1542,7 @@ void Texture::applyTexImage2D_load(State& state, GLenum target, const Image* ima
(((inwidth >> 2) << 2) != inwidth ||
((inheight >> 2) << 2) != inheight))
{
osg::notify(osg::NOTICE)<<"Received a request to compress an image, but image size is not a multiple of four ("<<inwidth<<"x"<<inheight<<"). Reverting to uncompressed.\n";
OSG_NOTICE<<"Received a request to compress an image, but image size is not a multiple of four ("<<inwidth<<"x"<<inheight<<"). Reverting to uncompressed.\n";
switch(_internalFormat)
{
case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
@@ -1576,7 +1576,7 @@ void Texture::applyTexImage2D_load(State& state, GLenum target, const Image* ima
unsigned char* dataPtr = (unsigned char*)image->data();
// osg::notify(osg::NOTICE)<<"inwidth="<<inwidth<<" inheight="<<inheight<<" image->getFileName()"<<image->getFileName()<<std::endl;
// OSG_NOTICE<<"inwidth="<<inwidth<<" inheight="<<inheight<<" image->getFileName()"<<image->getFileName()<<std::endl;
bool needImageRescale = inwidth!=image->s() || inheight!=image->t();
if (needImageRescale)
@@ -1586,12 +1586,12 @@ void Texture::applyTexImage2D_load(State& state, GLenum target, const Image* ima
if (image->isMipmap())
{
notify(WARN)<<"Warning:: Mipmapped osg::Image not a power of two, cannot apply to texture."<<std::endl;
OSG_WARN<<"Warning:: Mipmapped osg::Image not a power of two, cannot apply to texture."<<std::endl;
return;
}
else if (compressed_image)
{
notify(WARN)<<"Warning:: Compressed osg::Image not a power of two, cannot apply to texture."<<std::endl;
OSG_WARN<<"Warning:: Compressed osg::Image not a power of two, cannot apply to texture."<<std::endl;
return;
}
@@ -1600,12 +1600,12 @@ void Texture::applyTexImage2D_load(State& state, GLenum target, const Image* ima
if (!dataPtr)
{
notify(WARN)<<"Warning:: Not enough memory to resize image, cannot apply to texture."<<std::endl;
OSG_WARN<<"Warning:: Not enough memory to resize image, cannot apply to texture."<<std::endl;
return;
}
if (!image->getFileName().empty()) notify(NOTICE) << "Scaling image '"<<image->getFileName()<<"' from ("<<image->s()<<","<<image->t()<<") to ("<<inwidth<<","<<inheight<<")"<<std::endl;
else notify(NOTICE) << "Scaling image from ("<<image->s()<<","<<image->t()<<") to ("<<inwidth<<","<<inheight<<")"<<std::endl;
if (!image->getFileName().empty()) { OSG_NOTICE << "Scaling image '"<<image->getFileName()<<"' from ("<<image->s()<<","<<image->t()<<") to ("<<inwidth<<","<<inheight<<")"<<std::endl; }
else { OSG_NOTICE << "Scaling image from ("<<image->s()<<","<<image->t()<<") to ("<<inwidth<<","<<inheight<<")"<<std::endl; }
// rescale the image to the correct size.
glPixelStorei(GL_PACK_ALIGNMENT,image->getPacking());
@@ -1613,7 +1613,7 @@ void Texture::applyTexImage2D_load(State& state, GLenum target, const Image* ima
image->s(),image->t(),image->getDataType(),image->data(),
inwidth,inheight,image->getDataType(),dataPtr);
#else
osg::notify(osg::NOTICE)<<"Warning: gluScaleImage(..) not supported, cannot subload image."<<std::endl;
OSG_NOTICE<<"Warning: gluScaleImage(..) not supported, cannot subload image."<<std::endl;
return;
#endif
}
@@ -1628,7 +1628,7 @@ void Texture::applyTexImage2D_load(State& state, GLenum target, const Image* ima
state.bindPixelBufferObject(pbo);
dataPtr = reinterpret_cast<unsigned char*>(pbo->getOffset(image->getBufferIndex()));
#ifdef DO_TIMING
osg::notify(osg::NOTICE)<<"after PBO "<<osg::Timer::instance()->delta_m(start_tick,osg::Timer::instance()->tick())<<"ms"<<std::endl;
OSG_NOTICE<<"after PBO "<<osg::Timer::instance()->delta_m(start_tick,osg::Timer::instance()->tick())<<"ms"<<std::endl;
#endif
}
else
@@ -1742,12 +1742,12 @@ void Texture::applyTexImage2D_load(State& state, GLenum target, const Image* ima
height >>= 1;
}
#else
osg::notify(osg::NOTICE)<<"Warning:: gluBuild2DMipMaps(..) not supported."<<std::endl;
OSG_NOTICE<<"Warning:: gluBuild2DMipMaps(..) not supported."<<std::endl;
#endif
}
else
{
notify(WARN)<<"Warning:: Compressed image cannot be mip mapped"<<std::endl;
OSG_WARN<<"Warning:: Compressed image cannot be mip mapped"<<std::endl;
}
}
@@ -1763,7 +1763,7 @@ void Texture::applyTexImage2D_load(State& state, GLenum target, const Image* ima
static double s_total_time = 0.0;
double delta_time = osg::Timer::instance()->delta_m(start_tick,osg::Timer::instance()->tick());
s_total_time += delta_time;
osg::notify(osg::NOTICE)<<"glTexImage2D "<<delta_time<<"ms total "<<s_total_time<<"ms"<<std::endl;
OSG_NOTICE<<"glTexImage2D "<<delta_time<<"ms total "<<s_total_time<<"ms"<<std::endl;
#endif
if (needImageRescale)
@@ -1809,7 +1809,7 @@ void Texture::applyTexImage2D_subload(State& state, GLenum target, const Image*
#ifdef DO_TIMING
osg::Timer_t start_tick = osg::Timer::instance()->tick();
osg::notify(osg::NOTICE)<<"glTexSubImage2D pixelFormat = "<<std::hex<<image->getPixelFormat()<<std::dec<<std::endl;
OSG_NOTICE<<"glTexSubImage2D pixelFormat = "<<std::hex<<image->getPixelFormat()<<std::dec<<std::endl;
#endif
@@ -1833,12 +1833,12 @@ void Texture::applyTexImage2D_subload(State& state, GLenum target, const Image*
// resize the image to power of two.
if (image->isMipmap())
{
notify(WARN)<<"Warning:: Mipmapped osg::Image not a power of two, cannot apply to texture."<<std::endl;
OSG_WARN<<"Warning:: Mipmapped osg::Image not a power of two, cannot apply to texture."<<std::endl;
return;
}
else if (compressed_image)
{
notify(WARN)<<"Warning:: Compressed osg::Image not a power of two, cannot apply to texture."<<std::endl;
OSG_WARN<<"Warning:: Compressed osg::Image not a power of two, cannot apply to texture."<<std::endl;
return;
}
@@ -1847,12 +1847,12 @@ void Texture::applyTexImage2D_subload(State& state, GLenum target, const Image*
if (!data)
{
notify(WARN)<<"Warning:: Not enough memory to resize image, cannot apply to texture."<<std::endl;
OSG_WARN<<"Warning:: Not enough memory to resize image, cannot apply to texture."<<std::endl;
return;
}
if (!image->getFileName().empty()) notify(NOTICE) << "Scaling image '"<<image->getFileName()<<"' from ("<<image->s()<<","<<image->t()<<") to ("<<inwidth<<","<<inheight<<")"<<std::endl;
else notify(NOTICE) << "Scaling image from ("<<image->s()<<","<<image->t()<<") to ("<<inwidth<<","<<inheight<<")"<<std::endl;
if (!image->getFileName().empty()) { OSG_NOTICE << "Scaling image '"<<image->getFileName()<<"' from ("<<image->s()<<","<<image->t()<<") to ("<<inwidth<<","<<inheight<<")"<<std::endl; }
else { OSG_NOTICE << "Scaling image from ("<<image->s()<<","<<image->t()<<") to ("<<inwidth<<","<<inheight<<")"<<std::endl; }
// rescale the image to the correct size.
glPixelStorei(GL_PACK_ALIGNMENT,image->getPacking());
@@ -1860,7 +1860,7 @@ void Texture::applyTexImage2D_subload(State& state, GLenum target, const Image*
image->s(),image->t(),image->getDataType(),image->data(),
inwidth,inheight,image->getDataType(),data);
#else
osg::notify(osg::NOTICE)<<"Warning: gluScaleImage(..) not supported, cannot subload image."<<std::endl;
OSG_NOTICE<<"Warning: gluScaleImage(..) not supported, cannot subload image."<<std::endl;
return;
#endif
}
@@ -1877,7 +1877,7 @@ void Texture::applyTexImage2D_subload(State& state, GLenum target, const Image*
state.bindPixelBufferObject(pbo);
dataPtr = reinterpret_cast<unsigned char*>(pbo->getOffset(image->getBufferIndex()));
#ifdef DO_TIMING
osg::notify(osg::NOTICE)<<"after PBO "<<osg::Timer::instance()->delta_m(start_tick,osg::Timer::instance()->tick())<<"ms"<<std::endl;
OSG_NOTICE<<"after PBO "<<osg::Timer::instance()->delta_m(start_tick,osg::Timer::instance()->tick())<<"ms"<<std::endl;
#endif
}
else
@@ -1975,7 +1975,7 @@ void Texture::applyTexImage2D_subload(State& state, GLenum target, const Image*
}
else
{
//notify(WARN)<<"Warning:: cannot subload mip mapped texture from non mipmapped image."<<std::endl;
//OSG_WARN<<"Warning:: cannot subload mip mapped texture from non mipmapped image."<<std::endl;
applyTexImage2D_load(state, target, image, inwidth, inheight,numMipmapLevels);
return;
}
@@ -1986,7 +1986,7 @@ void Texture::applyTexImage2D_subload(State& state, GLenum target, const Image*
state.unbindPixelBufferObject();
}
#ifdef DO_TIMING
osg::notify(osg::NOTICE)<<"glTexSubImage2D "<<osg::Timer::instance()->delta_m(start_tick,osg::Timer::instance()->tick())<<"ms"<<std::endl;
OSG_NOTICE<<"glTexSubImage2D "<<osg::Timer::instance()->delta_m(start_tick,osg::Timer::instance()->tick())<<"ms"<<std::endl;
#endif
if (needImageRescale)
@@ -2125,8 +2125,8 @@ void Texture::resizeGLObjectBuffers(unsigned int maxSize)
void Texture::releaseGLObjects(State* state) const
{
// if (state) osg::notify(osg::NOTICE)<<"Texture::releaseGLObjects contextID="<<state->getContextID()<<std::endl;
// else osg::notify(osg::NOTICE)<<"Texture::releaseGLObjects no State "<<std::endl;
// if (state) OSG_NOTICE<<"Texture::releaseGLObjects contextID="<<state->getContextID()<<std::endl;
// else OSG_NOTICE<<"Texture::releaseGLObjects no State "<<std::endl;
if (!state) const_cast<Texture*>(this)->dirtyTextureObject();
else
@@ -2157,7 +2157,7 @@ Texture::Extensions::Extensions(unsigned int contextID)
const char* version = (const char*) glGetString( GL_VERSION );
if (!version)
{
osg::notify(osg::FATAL)<<"Error: In Texture::Extensions::setupGLExtensions(..) OpenGL version test failed, requires valid graphics context."<<std::endl;
OSG_FATAL<<"Error: In Texture::Extensions::setupGLExtensions(..) OpenGL version test failed, requires valid graphics context."<<std::endl;
return;
}
@@ -2206,14 +2206,14 @@ Texture::Extensions::Extensions(unsigned int contextID)
if (rendererString.find("Radeon")!=std::string::npos || rendererString.find("RADEON")!=std::string::npos)
{
_isNonPowerOfTwoTextureMipMappedSupported = false;
osg::notify(osg::INFO)<<"Disabling _isNonPowerOfTwoTextureMipMappedSupported for ATI hardware."<<std::endl;
OSG_INFO<<"Disabling _isNonPowerOfTwoTextureMipMappedSupported for ATI hardware."<<std::endl;
}
#endif
if (rendererString.find("GeForce FX")!=std::string::npos)
{
_isNonPowerOfTwoTextureMipMappedSupported = false;
osg::notify(osg::INFO)<<"Disabling _isNonPowerOfTwoTextureMipMappedSupported for GeForce FX hardware."<<std::endl;
OSG_INFO<<"Disabling _isNonPowerOfTwoTextureMipMappedSupported for GeForce FX hardware."<<std::endl;
}
glGetIntegerv(GL_MAX_TEXTURE_SIZE,&_maxTextureSize);

View File

@@ -248,7 +248,7 @@ void Texture1D::apply(State& state) const
generateMipmap(state);
}
#else
osg::notify(osg::NOTICE)<<"Warning: Texture1D::apply(State& state) not supported."<<std::endl;
OSG_NOTICE<<"Warning: Texture1D::apply(State& state) not supported."<<std::endl;
#endif
}
@@ -327,7 +327,7 @@ void Texture1D::applyTexImage1D(GLenum target, Image* image, State& state, GLsiz
(GLenum)image->getPixelFormat(), (GLenum)image->getDataType(),
image->data() );
#else
osg::notify(osg::NOTICE)<<"Warning: gluBuild1DMipmaps(..) not supported."<<std::endl;
OSG_NOTICE<<"Warning: gluBuild1DMipmaps(..) not supported."<<std::endl;
#endif
}
@@ -371,7 +371,7 @@ void Texture1D::applyTexImage1D(GLenum target, Image* image, State& state, GLsiz
inwidth = image->s();
#else
osg::notify(osg::NOTICE)<<"Warning: Texture1D::applyTexImage1D(State& state) not supported."<<std::endl;
OSG_NOTICE<<"Warning: Texture1D::applyTexImage1D(State& state) not supported."<<std::endl;
#endif
}
@@ -428,7 +428,7 @@ void Texture1D::copyTexImage1D(State& state, int x, int y, int width)
// inform state that this texture is the current one bound.
state.haveAppliedTextureAttribute(state.getActiveTextureUnit(), this);
#else
osg::notify(osg::NOTICE)<<"Warning: Texture1D::copyTexImage1D(..) not supported."<<std::endl;
OSG_NOTICE<<"Warning: Texture1D::copyTexImage1D(..) not supported."<<std::endl;
#endif
}
@@ -460,7 +460,7 @@ void Texture1D::copyTexSubImage1D(State& state, int xoffset, int x, int y, int w
copyTexImage1D(state,x,y,width);
}
#else
osg::notify(osg::NOTICE)<<"Warning: Texture1D::copyTexSubImage1D(..) not supported."<<std::endl;
OSG_NOTICE<<"Warning: Texture1D::copyTexSubImage1D(..) not supported."<<std::endl;
#endif
}
@@ -501,6 +501,6 @@ void Texture1D::allocateMipmap(State& state) const
state.haveAppliedTextureAttribute(state.getActiveTextureUnit(), this);
}
#else
osg::notify(osg::NOTICE)<<"Warning: Texture1D::allocateMipmap(..) not supported."<<std::endl;
OSG_NOTICE<<"Warning: Texture1D::allocateMipmap(..) not supported."<<std::endl;
#endif
}

View File

@@ -232,13 +232,13 @@ void Texture2D::apply(State& state) const
if (textureObject->isAllocated())
{
//notify(NOTICE)<<"Reusing texture object"<<std::endl;
//OSG_NOTICE<<"Reusing texture object"<<std::endl;
applyTexImage2D_subload(state,GL_TEXTURE_2D,image.get(),
_textureWidth, _textureHeight, _internalFormat, _numMipmapLevels);
}
else
{
//notify(NOTICE)<<"Creating new texture object"<<std::endl;
//OSG_NOTICE<<"Creating new texture object"<<std::endl;
applyTexImage2D_load(state,GL_TEXTURE_2D,image.get(),
_textureWidth, _textureHeight, _numMipmapLevels);
@@ -356,7 +356,7 @@ void Texture2D::copyTexImage2D(State& state, int x, int y, int width, int height
if (!hardwareMipMapOn)
{
// have to switch off mip mapping
notify(NOTICE)<<"Warning: Texture2D::copyTexImage2D(,,,,) switch off mip mapping as hardware support not available."<<std::endl;
OSG_NOTICE<<"Warning: Texture2D::copyTexImage2D(,,,,) switch off mip mapping as hardware support not available."<<std::endl;
_min_filter = LINEAR;
}
}
@@ -407,7 +407,7 @@ void Texture2D::copyTexSubImage2D(State& state, int xoffset, int yoffset, int x,
if (!hardwareMipMapOn)
{
// have to switch off mip mapping
notify(NOTICE)<<"Warning: Texture2D::copyTexImage2D(,,,,) switch off mip mapping as hardware support not available."<<std::endl;
OSG_NOTICE<<"Warning: Texture2D::copyTexImage2D(,,,,) switch off mip mapping as hardware support not available."<<std::endl;
_min_filter = LINEAR;
}
}

View File

@@ -106,7 +106,7 @@ void Texture2DArray::setImage(unsigned int layer, Image* image)
if (static_cast<int>(layer) >= _textureDepth)
{
// print warning and do nothing
notify(WARN)<<"Warning: Texture2DArray::setImage(..) failed, the given layer number is bigger then the size of the texture array."<<std::endl;
OSG_WARN<<"Warning: Texture2DArray::setImage(..) failed, the given layer number is bigger then the size of the texture array."<<std::endl;
return;
}
@@ -215,7 +215,7 @@ void Texture2DArray::apply(State& state) const
// if not supported, then return
if (!extensions->isTexture2DArraySupported() || !extensions->isTexture3DSupported())
{
notify(WARN)<<"Warning: Texture2DArray::apply(..) failed, 2D texture arrays are not support by OpenGL driver."<<std::endl;
OSG_WARN<<"Warning: Texture2DArray::apply(..) failed, 2D texture arrays are not support by OpenGL driver."<<std::endl;
return;
}
@@ -435,7 +435,7 @@ void Texture2DArray::applyTexImage2DArray_subload(State& state, Image* image, GL
if (indepth > extensions->maxLayerCount())
{
// we give a warning and do nothing
notify(WARN)<<"Warning: Texture2DArray::applyTexImage2DArray_subload(..) the given layer number exceeds the maximum number of supported layers."<<std::endl;
OSG_WARN<<"Warning: Texture2DArray::applyTexImage2DArray_subload(..) the given layer number exceeds the maximum number of supported layers."<<std::endl;
return;
}
@@ -450,7 +450,7 @@ void Texture2DArray::applyTexImage2DArray_subload(State& state, Image* image, GL
image->t()!=inheight ||
image->getInternalTextureFormat()!=inInternalFormat )
{
notify(WARN)<<"Warning: Texture2DArray::applyTexImage2DArray_subload(..) given image do have wrong dimension or internal format."<<std::endl;
OSG_WARN<<"Warning: Texture2DArray::applyTexImage2DArray_subload(..) given image do have wrong dimension or internal format."<<std::endl;
return;
}
@@ -481,7 +481,7 @@ void Texture2DArray::applyTexImage2DArray_subload(State& state, Image* image, GL
// if we support compression and image is compressed, then
else if (extensions->isCompressedTexImage3DSupported())
{
// notify(WARN)<<"glCompressedTexImage3D "<<inwidth<<", "<<inheight<<", "<<indepth<<std::endl;
// OSG_WARN<<"glCompressedTexImage3D "<<inwidth<<", "<<inheight<<", "<<indepth<<std::endl;
GLint blockSize, size;
getCompressedSize(_internalFormat, inwidth, inheight, 1, blockSize,size);
@@ -501,7 +501,7 @@ void Texture2DArray::applyTexImage2DArray_subload(State& state, Image* image, GL
if( !image->isMipmap() )
{
numMipmapLevels = 1;
notify(WARN)<<"Warning: Texture2DArray::applyTexImage2DArray_subload(..) mipmap layer not passed, and auto mipmap generation turned off or not available. Check texture's min/mag filters & hardware mipmap generation."<<std::endl;
OSG_WARN<<"Warning: Texture2DArray::applyTexImage2DArray_subload(..) mipmap layer not passed, and auto mipmap generation turned off or not available. Check texture's min/mag filters & hardware mipmap generation."<<std::endl;
// the image object does provide mipmaps, so upload the in the certain levels of a layer
}else
@@ -585,7 +585,7 @@ void Texture2DArray::copyTexSubImage2DArray(State& state, int xoffset, int yoffs
}
else
{
notify(WARN)<<"Warning: Texture2DArray::copyTexSubImage2DArray(..) failed, cannot not copy to a non existant texture."<<std::endl;
OSG_WARN<<"Warning: Texture2DArray::copyTexSubImage2DArray(..) failed, cannot not copy to a non existant texture."<<std::endl;
}
}
@@ -729,7 +729,7 @@ void Texture2DArray::Extensions::glTexImage3D( GLenum target, GLint level, GLenu
}
else
{
notify(WARN)<<"Error: glTexImage3D not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glTexImage3D not supported by OpenGL driver"<<std::endl;
}
}
@@ -741,7 +741,7 @@ void Texture2DArray::Extensions::glTexSubImage3D( GLenum target, GLint level, GL
}
else
{
notify(WARN)<<"Error: glTexSubImage3D not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glTexSubImage3D not supported by OpenGL driver"<<std::endl;
}
}
@@ -753,7 +753,7 @@ void Texture2DArray::Extensions::glCompressedTexImage3D(GLenum target, GLint lev
}
else
{
notify(WARN)<<"Error: glCompressedTexImage3D not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glCompressedTexImage3D not supported by OpenGL driver"<<std::endl;
}
}
@@ -765,7 +765,7 @@ void Texture2DArray::Extensions::glCompressedTexSubImage3D( GLenum target, GLint
}
else
{
notify(WARN)<<"Error: glCompressedTexImage2D not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glCompressedTexImage2D not supported by OpenGL driver"<<std::endl;
}
}
@@ -777,7 +777,7 @@ void Texture2DArray::Extensions::glCopyTexSubImage3D( GLenum target, GLint level
}
else
{
notify(WARN)<<"Error: glCopyTexSubImage3D not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glCopyTexSubImage3D not supported by OpenGL driver"<<std::endl;
}
}

View File

@@ -203,7 +203,7 @@ void Texture3D::apply(State& state) const
if (!extensions->isTexture3DSupported())
{
notify(WARN)<<"Warning: Texture3D::apply(..) failed, 3D texturing is not support by OpenGL driver."<<std::endl;
OSG_WARN<<"Warning: Texture3D::apply(..) failed, 3D texturing is not support by OpenGL driver."<<std::endl;
return;
}
@@ -367,7 +367,7 @@ void Texture3D::applyTexImage3D(GLenum target, Image* image, State& state, GLsiz
if (compressed)
{
//notify(WARN)<<"Warning::cannot currently use compressed format with 3D textures."<<std::endl;
//OSG_WARN<<"Warning::cannot currently use compressed format with 3D textures."<<std::endl;
//return;
}
@@ -404,7 +404,7 @@ void Texture3D::applyTexImage3D(GLenum target, Image* image, State& state, GLsiz
}
else if (extensions->isCompressedTexImage3DSupported())
{
// notify(WARN)<<"glCompressedTexImage3D "<<inwidth<<", "<<inheight<<", "<<indepth<<std::endl;
// OSG_WARN<<"glCompressedTexImage3D "<<inwidth<<", "<<inheight<<", "<<indepth<<std::endl;
numMipmapLevels = 1;
GLint blockSize, size;
@@ -494,7 +494,7 @@ void Texture3D::copyTexSubImage3D(State& state, int xoffset, int yoffset, int zo
}
else
{
notify(WARN)<<"Warning: Texture3D::copyTexSubImage3D(..) failed, cannot not copy to a non existant texture."<<std::endl;
OSG_WARN<<"Warning: Texture3D::copyTexSubImage3D(..) failed, cannot not copy to a non existant texture."<<std::endl;
}
}
@@ -624,7 +624,7 @@ void Texture3D::Extensions::glTexImage3D( GLenum target, GLint level, GLenum int
}
else
{
notify(WARN)<<"Error: glTexImage3D not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glTexImage3D not supported by OpenGL driver"<<std::endl;
}
}
@@ -637,7 +637,7 @@ void Texture3D::Extensions::glTexSubImage3D( GLenum target, GLint level, GLint x
}
else
{
notify(WARN)<<"Error: glTexSubImage3D not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glTexSubImage3D not supported by OpenGL driver"<<std::endl;
}
}
@@ -649,7 +649,7 @@ void Texture3D::Extensions::glCompressedTexImage3D(GLenum target, GLint level, G
}
else
{
notify(WARN)<<"Error: glCompressedTexImage3D not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glCompressedTexImage3D not supported by OpenGL driver"<<std::endl;
}
}
@@ -661,7 +661,7 @@ void Texture3D::Extensions::glCompressedTexSubImage3D( GLenum target, GLint leve
}
else
{
notify(WARN)<<"Error: glCompressedTexImage2D not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glCompressedTexImage2D not supported by OpenGL driver"<<std::endl;
}
}
@@ -674,7 +674,7 @@ void Texture3D::Extensions::glCopyTexSubImage3D( GLenum target, GLint level, GLi
}
else
{
notify(WARN)<<"Error: glCopyTexSubImage3D not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glCopyTexSubImage3D not supported by OpenGL driver"<<std::endl;
}
}
@@ -687,6 +687,6 @@ void Texture3D::Extensions::gluBuild3DMipmaps( GLenum target, GLint internalForm
}
else
{
notify(WARN)<<"Error: gluBuild3DMipmaps not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: gluBuild3DMipmaps not supported by OpenGL driver"<<std::endl;
}
}

View File

@@ -384,7 +384,7 @@ void TextureCubeMap::copyTexSubImageCubeMap(State& state, int face, int xoffset,
if (!textureObject)
{
// failed to create texture object
osg::notify(osg::NOTICE)<<"Warning : failed to create TextureCubeMap texture obeject, copyTexSubImageCubeMap abondoned."<<std::endl;
OSG_NOTICE<<"Warning : failed to create TextureCubeMap texture obeject, copyTexSubImageCubeMap abondoned."<<std::endl;
return;
}
@@ -408,7 +408,7 @@ void TextureCubeMap::copyTexSubImageCubeMap(State& state, int face, int xoffset,
if (!hardwareMipMapOn)
{
// have to switch off mip mapping
notify(NOTICE)<<"Warning: TextureCubeMap::copyTexImage2D(,,,,) switch off mip mapping as hardware support not available."<<std::endl;
OSG_NOTICE<<"Warning: TextureCubeMap::copyTexImage2D(,,,,) switch off mip mapping as hardware support not available."<<std::endl;
_min_filter = LINEAR;
}
}

View File

@@ -154,7 +154,7 @@ void TextureRectangle::apply(State& state) const
if (!s_rectangleSupported)
{
notify(WARN)<<"Warning: TextureRectangle::apply(..) failed, texture rectangle is not support by your OpenGL drivers."<<std::endl;
OSG_WARN<<"Warning: TextureRectangle::apply(..) failed, texture rectangle is not support by your OpenGL drivers."<<std::endl;
return;
}
@@ -395,7 +395,7 @@ void TextureRectangle::applyTexImage_subload(GLenum target, Image* image, State&
#ifdef DO_TIMING
osg::Timer_t start_tick = osg::Timer::instance()->tick();
osg::notify(osg::NOTICE)<<"TextureRectangle::apply pixelFormat = "<<std::hex<<image->getPixelFormat()<<std::dec<<std::endl;
OSG_NOTICE<<"TextureRectangle::apply pixelFormat = "<<std::hex<<image->getPixelFormat()<<std::dec<<std::endl;
#endif
const unsigned char* dataPtr = image->data();
GLBufferObject* pbo = image->getOrCreateGLBufferObject(contextID);
@@ -404,12 +404,12 @@ void TextureRectangle::applyTexImage_subload(GLenum target, Image* image, State&
state.bindPixelBufferObject(pbo);
dataPtr = reinterpret_cast<unsigned char*>(pbo->getOffset(image->getBufferIndex()));
#ifdef DO_TIMING
osg::notify(osg::NOTICE)<<"after PBO "<<osg::Timer::instance()->delta_m(start_tick,osg::Timer::instance()->tick())<<"ms"<<std::endl;
OSG_NOTICE<<"after PBO "<<osg::Timer::instance()->delta_m(start_tick,osg::Timer::instance()->tick())<<"ms"<<std::endl;
#endif
}
else
{
osg::notify(osg::NOTICE)<<" no PixelBufferObject "<<image->getBufferObject()<<", "<<image->getPixelBufferObject()<<" pbo="<<pbo<<std::endl;
OSG_NOTICE<<" no PixelBufferObject "<<image->getBufferObject()<<", "<<image->getPixelBufferObject()<<" pbo="<<pbo<<std::endl;
}
@@ -438,7 +438,7 @@ void TextureRectangle::applyTexImage_subload(GLenum target, Image* image, State&
}
#ifdef DO_TIMING
osg::notify(osg::NOTICE)<<"glTexSubImage2D "<<osg::Timer::instance()->delta_m(start_tick,osg::Timer::instance()->tick())<<"ms"<<std::endl;
OSG_NOTICE<<"glTexSubImage2D "<<osg::Timer::instance()->delta_m(start_tick,osg::Timer::instance()->tick())<<"ms"<<std::endl;
#endif
}
@@ -503,7 +503,7 @@ void TextureRectangle::copyTexImage2D(State& state, int x, int y, int width, int
if (!hardwareMipMapOn)
{
// have to swtich off mip mapping
notify(NOTICE)<<"Warning: Texture2D::copyTexImage2D(,,,,) switch of mip mapping as hardware support not available."<<std::endl;
OSG_NOTICE<<"Warning: Texture2D::copyTexImage2D(,,,,) switch of mip mapping as hardware support not available."<<std::endl;
_min_filter = LINEAR;
}
}
@@ -554,7 +554,7 @@ void TextureRectangle::copyTexSubImage2D(State& state, int xoffset, int yoffset,
if (!hardwareMipMapOn)
{
// have to swtich off mip mapping
notify(NOTICE)<<"Warning: Texture2D::copyTexImage2D(,,,,) switch of mip mapping as hardware support not available."<<std::endl;
OSG_NOTICE<<"Warning: Texture2D::copyTexImage2D(,,,,) switch of mip mapping as hardware support not available."<<std::endl;
_min_filter = LINEAR;
}
}
@@ -579,6 +579,6 @@ void TextureRectangle::copyTexSubImage2D(State& state, int xoffset, int yoffset,
void TextureRectangle::allocateMipmap(State&) const
{
osg::notify(osg::NOTICE)<<"Warning: TextureRectangle::allocateMipmap(State&) called eroneously, GL_TEXTURE_RECTANGLE does not support mipmapping."<<std::endl;
OSG_NOTICE<<"Warning: TextureRectangle::allocateMipmap(State&) called eroneously, GL_TEXTURE_RECTANGLE does not support mipmapping."<<std::endl;
}

View File

@@ -48,8 +48,8 @@ Timer* Timer::instance()
else
{
_secsPerTick = 1.0;
notify(NOTICE)<<"Error: Timer::Timer() unable to use QueryPerformanceFrequency, "<<std::endl;
notify(NOTICE)<<"timing code will be wrong, Windows error code: "<<GetLastError()<<std::endl;
OSG_NOTICE<<"Error: Timer::Timer() unable to use QueryPerformanceFrequency, "<<std::endl;
OSG_NOTICE<<"timing code will be wrong, Windows error code: "<<GetLastError()<<std::endl;
}
setStartTick();
@@ -64,8 +64,8 @@ Timer* Timer::instance()
}
else
{
notify(NOTICE)<<"Error: Timer::Timer() unable to use QueryPerformanceCounter, "<<std::endl;
notify(NOTICE)<<"timing code will be wrong, Windows error code: "<<GetLastError()<<std::endl;
OSG_NOTICE<<"Error: Timer::Timer() unable to use QueryPerformanceCounter, "<<std::endl;
OSG_NOTICE<<"timing code will be wrong, Windows error code: "<<GetLastError()<<std::endl;
return 0;
}
}

View File

@@ -86,9 +86,9 @@ void TransferFunction1D::assignToImage(float lower_v, const osg::Vec4& lower_c,
if (end_iPos < 0) return;
if (end_iPos > endPos) end_iPos = endPos;
//osg::notify(osg::NOTICE)<<"TransferFunction1D::assignToImage[lower_v="<<lower_v<<", lower_c="<<lower_c<<", upper_v="<<upper_v<<" upper_c="<<upper_c<<std::endl;
//osg::notify(osg::NOTICE)<<" lower_iPos="<<lower_iPos<<" start_iPpos="<<start_iPos<<std::endl;
//osg::notify(osg::NOTICE)<<" upper_iPos="<<upper_iPos<<" end_iPpos="<<end_iPos<<std::endl;
//OSG_NOTICE<<"TransferFunction1D::assignToImage[lower_v="<<lower_v<<", lower_c="<<lower_c<<", upper_v="<<upper_v<<" upper_c="<<upper_c<<std::endl;
//OSG_NOTICE<<" lower_iPos="<<lower_iPos<<" start_iPpos="<<start_iPos<<std::endl;
//OSG_NOTICE<<" upper_iPos="<<upper_iPos<<" end_iPpos="<<end_iPos<<std::endl;
// upper_iPos can be identical to lower_iPos in case an underflow occurred while calculation the values;
// if both values are identical delta_c is identical to the null vector otherwise it is calculated like follows:
@@ -100,7 +100,7 @@ void TransferFunction1D::assignToImage(float lower_v, const osg::Vec4& lower_c,
for(int i=start_iPos; i<=end_iPos; ++i, ++iPos)
{
imageData[i] = lower_c + delta_c*(iPos-lower_iPos);
//osg::notify(osg::NOTICE)<<" imageData["<<i<<"] = "<<imageData[i]<<std::endl;
//OSG_NOTICE<<" imageData["<<i<<"] = "<<imageData[i]<<std::endl;
}
_image->dirty();

View File

@@ -55,7 +55,7 @@ Uniform::~Uniform()
void Uniform::addParent(osg::StateSet* object)
{
osg::notify(osg::DEBUG_FP)<<"Uniform Adding parent"<<std::endl;
OSG_DEBUG_FP<<"Uniform Adding parent"<<std::endl;
_parents.push_back(object);
}
@@ -72,7 +72,7 @@ bool Uniform::setType( Type t )
if( _type != UNDEFINED )
{
osg::notify(osg::WARN) << "cannot change Uniform type" << std::endl;
OSG_WARN << "cannot change Uniform type" << std::endl;
return false;
}
_type = t;
@@ -84,7 +84,7 @@ void Uniform::setName( const std::string& name )
{
if( _name != "" )
{
osg::notify(osg::WARN) << "cannot change Uniform name" << std::endl;
OSG_WARN << "cannot change Uniform name" << std::endl;
return;
}
_name = name;
@@ -94,7 +94,7 @@ void Uniform::setNumElements( unsigned int numElements )
{
if( numElements < 1 )
{
osg::notify(osg::WARN) << "Uniform numElements < 1 is invalid" << std::endl;
OSG_WARN << "Uniform numElements < 1 is invalid" << std::endl;
return;
}
@@ -102,7 +102,7 @@ void Uniform::setNumElements( unsigned int numElements )
if( _numElements>0 )
{
osg::notify(osg::WARN) << "Warning: Uniform::setNumElements() cannot change Uniform numElements, size already fixed." << std::endl;
OSG_WARN << "Warning: Uniform::setNumElements() cannot change Uniform numElements, size already fixed." << std::endl;
return;
}
@@ -155,7 +155,7 @@ bool Uniform::setArray( FloatArray* array )
// incoming array must match configuration of the Uniform
if( getInternalArrayType(getType())!=GL_FLOAT || getInternalArrayNumElements()!=array->getNumElements() )
{
osg::notify(osg::WARN) << "Uniform::setArray : incompatible array" << std::endl;
OSG_WARN << "Uniform::setArray : incompatible array" << std::endl;
return false;
}
@@ -173,7 +173,7 @@ bool Uniform::setArray( IntArray* array )
// incoming array must match configuration of the Uniform
if( getInternalArrayType(getType())!=GL_INT || getInternalArrayNumElements()!=array->getNumElements() )
{
osg::notify(osg::WARN) << "Uniform::setArray : incompatible array" << std::endl;
OSG_WARN << "Uniform::setArray : incompatible array" << std::endl;
return false;
}
@@ -191,7 +191,7 @@ bool Uniform::setArray( UIntArray* array )
// incoming array must match configuration of the Uniform
if( getInternalArrayType(getType())!=GL_UNSIGNED_INT || getInternalArrayNumElements()!=array->getNumElements() )
{
osg::notify(osg::WARN) << "Uniform::setArray : incompatible array" << std::endl;
OSG_WARN << "Uniform::setArray : incompatible array" << std::endl;
return false;
}
@@ -268,9 +268,8 @@ bool Uniform::isCompatibleType( Type t ) const
if( t == getType() ) return true;
if( getGlApiType(t) == getGlApiType(getType()) ) return true;
osg::notify(osg::WARN)
<< "Cannot assign between Uniform types " << getTypename(t)
<< " and " << getTypename(getType()) << std::endl;
OSG_WARN << "Cannot assign between Uniform types " << getTypename(t)
<< " and " << getTypename(getType()) << std::endl;
return false;
}
@@ -1393,7 +1392,7 @@ bool Uniform::getElement( unsigned int index, bool& b0, bool& b1, bool& b2, bool
void Uniform::apply(const GL2Extensions* ext, GLint location) const
{
// osg::notify(osg::NOTICE) << "uniform at "<<location<<" "<<_name<< std::endl;
// OSG_NOTICE << "uniform at "<<location<<" "<<_name<< std::endl;
GLsizei num = getNumElements();
if( num < 1 ) return;
@@ -1461,14 +1460,14 @@ void Uniform::apply(const GL2Extensions* ext, GLint location) const
break;
default:
osg::notify(osg::FATAL) << "how got here? " __FILE__ ":" << __LINE__ << std::endl;
OSG_FATAL << "how got here? " __FILE__ ":" << __LINE__ << std::endl;
break;
}
}
void Uniform::setUpdateCallback(Callback* uc)
{
osg::notify(osg::INFO)<<"Uniform::Setting Update callbacks"<<std::endl;
OSG_INFO<<"Uniform::Setting Update callbacks"<<std::endl;
if (_updateCallback==uc) return;
@@ -1480,13 +1479,13 @@ void Uniform::setUpdateCallback(Callback* uc)
if (delta!=0)
{
osg::notify(osg::INFO)<<"Going to set Uniform parents"<<std::endl;
OSG_INFO<<"Going to set Uniform parents"<<std::endl;
for(ParentList::iterator itr=_parents.begin();
itr!=_parents.end();
++itr)
{
osg::notify(osg::INFO)<<" setting Uniform parent"<<std::endl;
OSG_INFO<<" setting Uniform parent"<<std::endl;
(*itr)->setNumChildrenRequiringUpdateTraversal((*itr)->getNumChildrenRequiringUpdateTraversal()+delta);
}
}
@@ -1494,7 +1493,7 @@ void Uniform::setUpdateCallback(Callback* uc)
void Uniform::setEventCallback(Callback* ec)
{
osg::notify(osg::INFO)<<"Uniform::Setting Event callbacks"<<std::endl;
OSG_INFO<<"Uniform::Setting Event callbacks"<<std::endl;
if (_eventCallback==ec) return;

View File

@@ -154,15 +154,15 @@ void VertexProgram::apply(State& state) const
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorposition);
if (errorposition != -1)
{
notify(osg::FATAL) << "VertexProgram: " << glGetString(GL_PROGRAM_ERROR_STRING_ARB) << std::endl;
OSG_FATAL << "VertexProgram: " << glGetString(GL_PROGRAM_ERROR_STRING_ARB) << std::endl;
std::string::size_type start = _vertexProgram.rfind('\n', errorposition);
std::string::size_type stop = _vertexProgram.find('\n', errorposition);
if (start!=std::string::npos && stop!=std::string::npos)
{
notify(osg::FATAL) << " : " << _vertexProgram.substr(start+1, stop-start-2) << std::endl;
OSG_FATAL << " : " << _vertexProgram.substr(start+1, stop-start-2) << std::endl;
std::string pointAtproblem(errorposition-(start+1), ' ');
notify(osg::FATAL) << " : " << pointAtproblem << '^' << std::endl;
OSG_FATAL << " : " << pointAtproblem << '^' << std::endl;
}
return;
}
@@ -191,7 +191,7 @@ void VertexProgram::apply(State& state) const
glMatrixMode(GL_MODELVIEW); // restore matrix mode
}
#else
osg::notify(osg::NOTICE)<<"Warning: VertexProgram::apply(State&) - not supported."<<std::endl;
OSG_NOTICE<<"Warning: VertexProgram::apply(State&) - not supported."<<std::endl;
#endif
}
@@ -277,7 +277,7 @@ void VertexProgram::Extensions::glBindProgram(GLenum target, GLuint id) const
}
else
{
notify(WARN)<<"Error: glBindProgram not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glBindProgram not supported by OpenGL driver"<<std::endl;
}
}
@@ -289,7 +289,7 @@ void VertexProgram::Extensions::glGenPrograms(GLsizei n, GLuint *programs) const
}
else
{
notify(WARN)<<"Error: glGenPrograms not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glGenPrograms not supported by OpenGL driver"<<std::endl;
}
}
@@ -301,7 +301,7 @@ void VertexProgram::Extensions::glDeletePrograms(GLsizei n, GLuint *programs) co
}
else
{
notify(WARN)<<"Error: glDeletePrograms not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glDeletePrograms not supported by OpenGL driver"<<std::endl;
}
}
@@ -313,7 +313,7 @@ void VertexProgram::Extensions::glProgramString(GLenum target, GLenum format, GL
}
else
{
notify(WARN)<<"Error: glProgramString not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glProgramString not supported by OpenGL driver"<<std::endl;
}
}
@@ -325,6 +325,6 @@ void VertexProgram::Extensions::glProgramLocalParameter4fv(GLenum target, GLuint
}
else
{
notify(WARN)<<"Error: glProgramLocalParameter4fv not supported by OpenGL driver"<<std::endl;
OSG_WARN<<"Error: glProgramLocalParameter4fv not supported by OpenGL driver"<<std::endl;
}
}

View File

@@ -20,7 +20,7 @@ using namespace osg;
View::View():
Object(true)
{
// OSG_NOTIFY(osg::NOTICE)<<"Constructing osg::View"<<std::endl;
// OSG_NOTICE<<"Constructing osg::View"<<std::endl;
setLightingMode(HEADLIGHT);
@@ -52,7 +52,7 @@ View::View(const osg::View& view, const osg::CopyOp& copyop):
View::~View()
{
OSG_NOTIFY(osg::INFO)<<"Destructing osg::View"<<std::endl;
OSG_INFO<<"Destructing osg::View"<<std::endl;
if (_camera.valid())
{
@@ -82,7 +82,7 @@ View::~View()
}
#endif
OSG_NOTIFY(osg::INFO)<<"Done destructing osg::View"<<std::endl;
OSG_INFO<<"Done destructing osg::View"<<std::endl;
}
void View::take(osg::View& rhs)