Convert NOTIFY to OSG_NOTIFY to avoid problems with polution of users apps with the NOTIFY macro
This commit is contained in:
@@ -55,13 +55,13 @@ void GraphicsContext::setWindowingSystemInterface(WindowingSystemInterface* call
|
||||
{
|
||||
ref_ptr<GraphicsContext::WindowingSystemInterface> &wsref = windowingSystemInterfaceRef();
|
||||
wsref = callback;
|
||||
NOTIFY(osg::INFO)<<"GraphicsContext::setWindowingSystemInterface() "<<wsref.get()<<"\t"<<&wsref<<std::endl;
|
||||
OSG_NOTIFY(osg::INFO)<<"GraphicsContext::setWindowingSystemInterface() "<<wsref.get()<<"\t"<<&wsref<<std::endl;
|
||||
}
|
||||
|
||||
GraphicsContext::WindowingSystemInterface* GraphicsContext::getWindowingSystemInterface()
|
||||
{
|
||||
ref_ptr<GraphicsContext::WindowingSystemInterface> &wsref = windowingSystemInterfaceRef();
|
||||
NOTIFY(osg::INFO)<<"GraphicsContext::getWindowingSystemInterface() "<<wsref.get()<<"\t"<<&wsref<<std::endl;
|
||||
OSG_NOTIFY(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
|
||||
NOTIFY(osg::NOTICE)<<" hostName ["<<hostName<<"]"<<std::endl;
|
||||
NOTIFY(osg::NOTICE)<<" displayNum "<<displayNum<<std::endl;
|
||||
NOTIFY(osg::NOTICE)<<" screenNum "<<screenNum<<std::endl;
|
||||
OSG_NOTIFY(osg::NOTICE)<<" hostName ["<<hostName<<"]"<<std::endl;
|
||||
OSG_NOTIFY(osg::NOTICE)<<" displayNum "<<displayNum<<std::endl;
|
||||
OSG_NOTIFY(osg::NOTICE)<<" screenNum "<<screenNum<<std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -226,11 +226,11 @@ public:
|
||||
{
|
||||
--_numContexts;
|
||||
|
||||
NOTIFY(osg::INFO)<<"decrementUsageCount()"<<_numContexts<<std::endl;
|
||||
OSG_NOTIFY(osg::INFO)<<"decrementUsageCount()"<<_numContexts<<std::endl;
|
||||
|
||||
if (_numContexts <= 1 && _compileContext.valid())
|
||||
{
|
||||
NOTIFY(osg::INFO)<<"resetting compileContext "<<_compileContext.get()<<" refCount "<<_compileContext->referenceCount()<<std::endl;
|
||||
OSG_NOTIFY(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;
|
||||
|
||||
NOTIFY(osg::INFO)<<"GraphicsContext::createNewContextID() reusing contextID="<<itr->first<<std::endl;
|
||||
OSG_NOTIFY(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;
|
||||
|
||||
NOTIFY(osg::INFO)<<"GraphicsContext::createNewContextID() creating contextID="<<contextID<<std::endl;
|
||||
NOTIFY(osg::INFO)<<"Updating the MaxNumberOfGraphicsContexts to "<<contextID+1<<std::endl;
|
||||
OSG_NOTIFY(osg::INFO)<<"GraphicsContext::createNewContextID() creating contextID="<<contextID<<std::endl;
|
||||
OSG_NOTIFY(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);
|
||||
|
||||
NOTIFY(osg::INFO)<<"GraphicsContext::incrementContextIDUsageCount("<<contextID<<") to "<<s_contextIDMap[contextID]._numContexts<<std::endl;
|
||||
OSG_NOTIFY(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
|
||||
{
|
||||
NOTIFY(osg::NOTICE)<<"Warning: decrementContextIDUsageCount("<<contextID<<") called on expired contextID."<<std::endl;
|
||||
OSG_NOTIFY(osg::NOTICE)<<"Warning: decrementContextIDUsageCount("<<contextID<<") called on expired contextID."<<std::endl;
|
||||
}
|
||||
|
||||
NOTIFY(osg::INFO)<<"GraphicsContext::decrementContextIDUsageCount("<<contextID<<") to "<<s_contextIDMap[contextID]._numContexts<<std::endl;
|
||||
OSG_NOTIFY(osg::INFO)<<"GraphicsContext::decrementContextIDUsageCount("<<contextID<<") to "<<s_contextIDMap[contextID]._numContexts<<std::endl;
|
||||
|
||||
}
|
||||
|
||||
|
||||
void GraphicsContext::registerGraphicsContext(GraphicsContext* gc)
|
||||
{
|
||||
NOTIFY(osg::INFO)<<"GraphicsContext::registerGraphicsContext "<<gc<<std::endl;
|
||||
OSG_NOTIFY(osg::INFO)<<"GraphicsContext::registerGraphicsContext "<<gc<<std::endl;
|
||||
|
||||
if (!gc) return;
|
||||
|
||||
@@ -338,7 +338,7 @@ void GraphicsContext::registerGraphicsContext(GraphicsContext* gc)
|
||||
|
||||
void GraphicsContext::unregisterGraphicsContext(GraphicsContext* gc)
|
||||
{
|
||||
NOTIFY(osg::INFO)<<"GraphicsContext::unregisterGraphicsContext "<<gc<<std::endl;
|
||||
OSG_NOTIFY(osg::INFO)<<"GraphicsContext::unregisterGraphicsContext "<<gc<<std::endl;
|
||||
|
||||
if (!gc) return;
|
||||
|
||||
@@ -350,7 +350,7 @@ void GraphicsContext::unregisterGraphicsContext(GraphicsContext* gc)
|
||||
|
||||
GraphicsContext::GraphicsContexts GraphicsContext::getAllRegisteredGraphicsContexts()
|
||||
{
|
||||
NOTIFY(osg::INFO)<<"GraphicsContext::getAllRegisteredGraphicsContexts s_registeredContexts.size()="<<s_registeredContexts.size()<<std::endl;
|
||||
OSG_NOTIFY(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);
|
||||
}
|
||||
|
||||
NOTIFY(osg::INFO)<<"GraphicsContext::getRegisteredGraphicsContexts "<<contextID<<" contexts.size()="<<contexts.size()<<std::endl;
|
||||
OSG_NOTIFY(osg::INFO)<<"GraphicsContext::getRegisteredGraphicsContexts "<<contextID<<" contexts.size()="<<contexts.size()<<std::endl;
|
||||
|
||||
return contexts;
|
||||
}
|
||||
|
||||
GraphicsContext* GraphicsContext::getOrCreateCompileContext(unsigned int contextID)
|
||||
{
|
||||
NOTIFY(osg::NOTICE)<<"GraphicsContext::createCompileContext."<<std::endl;
|
||||
OSG_NOTIFY(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;
|
||||
NOTIFY(osg::NOTICE)<<" succeeded GraphicsContext::createCompileContext."<<std::endl;
|
||||
OSG_NOTIFY(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)
|
||||
{
|
||||
// NOTIFY(osg::NOTICE)<<"GraphicsContext::getCompileContext "<<contextID<<std::endl;
|
||||
// OSG_NOTIFY(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)
|
||||
{
|
||||
NOTIFY(osg::INFO)<<"close("<<callCloseImplementation<<")"<<this<<std::endl;
|
||||
OSG_NOTIFY(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)
|
||||
{
|
||||
NOTIFY(osg::INFO)<<"Releasing GL objects for Camera="<<camera<<" _state="<<_state.get()<<std::endl;
|
||||
OSG_NOTIFY(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())
|
||||
{
|
||||
NOTIFY(osg::INFO)<<"Closing still viable window "<<sharedContextExists<<" _state->getContextID()="<<_state->getContextID()<<std::endl;
|
||||
OSG_NOTIFY(osg::INFO)<<"Closing still viable window "<<sharedContextExists<<" _state->getContextID()="<<_state->getContextID()<<std::endl;
|
||||
|
||||
if (makeCurrent())
|
||||
{
|
||||
|
||||
NOTIFY(osg::INFO)<<"Doing delete of GL objects"<<std::endl;
|
||||
OSG_NOTIFY(osg::INFO)<<"Doing delete of GL objects"<<std::endl;
|
||||
|
||||
osg::deleteAllGLObjects(_state->getContextID());
|
||||
|
||||
NOTIFY(osg::INFO)<<"Done delete of GL objects"<<std::endl;
|
||||
OSG_NOTIFY(osg::INFO)<<"Done delete of GL objects"<<std::endl;
|
||||
|
||||
_state->reset();
|
||||
|
||||
@@ -543,7 +543,7 @@ void GraphicsContext::close(bool callCloseImplementation)
|
||||
}
|
||||
else
|
||||
{
|
||||
NOTIFY(osg::INFO)<<"makeCurrent did not succeed, could not do flush/deletion of OpenGL objects."<<std::endl;
|
||||
OSG_NOTIFY(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())
|
||||
{
|
||||
NOTIFY(osg::INFO)<<"Doing discard of deleted OpenGL objects."<<std::endl;
|
||||
OSG_NOTIFY(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)
|
||||
{
|
||||
NOTIFY(osg::INFO)<<"Doing add"<<std::endl;
|
||||
OSG_NOTIFY(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)
|
||||
{
|
||||
NOTIFY(osg::INFO)<<"Doing remove operation"<<std::endl;
|
||||
OSG_NOTIFY(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)
|
||||
{
|
||||
NOTIFY(osg::INFO)<<"Doing remove named operation"<<std::endl;
|
||||
OSG_NOTIFY(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()
|
||||
{
|
||||
NOTIFY(osg::INFO)<<"Doing remove all operations"<<std::endl;
|
||||
OSG_NOTIFY(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())
|
||||
{
|
||||
// NOTIFY(osg::INFO)<<"Doing op "<<_currentOperation->getName()<<" "<<this<<std::endl;
|
||||
// OSG_NOTIFY(osg::INFO)<<"Doing op "<<_currentOperation->getName()<<" "<<this<<std::endl;
|
||||
|
||||
// call the graphics operation.
|
||||
(*_currentOperation)(this);
|
||||
|
||||
Reference in New Issue
Block a user