diff --git a/include/osg/Notify b/include/osg/Notify index 194c268a0..d81847420 100644 --- a/include/osg/Notify +++ b/include/osg/Notify @@ -11,8 +11,8 @@ * OpenSceneGraph Public License for more details. */ -#ifndef OSG_NOTIFY -#define OSG_NOTIFY 1 +#ifndef OSG_NOTIFY_H +#define OSG_NOTIFY_H 1 #include #include // for NotifyHandler @@ -75,13 +75,13 @@ extern OSG_EXPORT std::ostream& notify(const NotifySeverity severity); inline std::ostream& notify(void) { return notify(osg::INFO); } -#define NOTIFY(level) if (level>isNotifyEnabled(level)) osg::notify(level) +#define OSG_NOTIFY(level) if (level>isNotifyEnabled(level)) osg::notify(level) #if _DEBUG - #define DEBUG_NOTIFY(level) if (level>isNotifyEnabled(level)) osg::notify(level) + #define OSG_DEBUG_NOTIFY(level) if (level>isNotifyEnabled(level)) osg::notify(level) #else // when using an optimized build use if (false) to tell the compiler to ignore the rest of the notify. - #define DEBUG_NOTIFY(level) if (false) osg::notify(level) + #define OSG_DEBUG_NOTIFY(level) if (false) osg::notify(level) #endif /** Handler processing output of notification stream. It acts as a sink to diff --git a/src/osg/BufferObject.cpp b/src/osg/BufferObject.cpp index dec05390d..c98f9cb3f 100644 --- a/src/osg/BufferObject.cpp +++ b/src/osg/BufferObject.cpp @@ -66,12 +66,12 @@ GLBufferObject::GLBufferObject(unsigned int contextID, BufferObject* bufferObjec _extensions->glGenBuffers(1, &_glObjectID); } - // NOTIFY(osg::NOTICE)<<"Constucting BufferObject "<getTotalDataSize(); entry.dataSource = bd; #if 0 - NOTIFY(osg::NOTICE)<<"entry"< _profile._size) { - NOTIFY(osg::INFO)<<"newTotalSize="<getModifiedCount(); if (vboMemory) @@ -224,7 +224,7 @@ void GLBufferObject::compileBuffer() void GLBufferObject::deleteGLObject() { - NOTIFY(osg::INFO)<<"GLBufferObject::deleteGLObject() "<<_glObjectID<glDeleteBuffers(1, &_glObjectID); @@ -397,16 +397,16 @@ GLBufferObjectSet::GLBufferObjectSet(GLBufferObjectManager* parent, const Buffer _head(0), _tail(0) { - NOTIFY(osg::INFO)<<"GLBufferObjectSet::GLBufferObjectSet _profile._size="<<_profile._size<_next)->_previous != to) { - NOTIFY(osg::NOTICE)<<"GLBufferObjectSet::checkConsistency() : Error (to->_next)->_previous != to "<_next)->_previous != to "<_previous = "<_previous<_next = "<_next<_previous = "<_previous<_next = "<_next<_previous = "<_previous<_next = "<_next<_previous = "<_previous<_next = "<_next<_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) { - NOTIFY(osg::NOTICE)<<"Error ***************** Should not get here !!!!!!!!!"<_next==0) { - NOTIFY(osg::NOTICE)<<"Error ***************** Should not get here either !!!!!!!!!"<_previous = "<_previous<_next = "<_next<_previous = "<_previous<_next = "<_next<_previous = "<_previous<_next = "<_next<_previous = "<_previous<_next = "<_next<_previous !=0 || to->_next !=0) @@ -848,10 +848,10 @@ void GLBufferObjectSet::addToBack(GLBufferObject* to) _tail = to; } #if 0 - NOTIFY(osg::NOTICE)<<" a2B after _head = "<<_head<_previous = "<_previous<_next = "<_next<_previous = "<_previous<_next = "<_next<getContextID(); @@ -1188,7 +1188,7 @@ void BufferObject::releaseGLObjects(State* state) const { if (_glBufferObjects[i].valid()) { - // NOTIFY(osg::NOTICE)<<" GLBufferObject::releaseGLBufferObject("< 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) { - NOTIFY(osg::NOTICE)<<"Warning::BufferObject::deleteBufferObject("<(&settings); if (camera) { - //NOTIFY(osg::NOTICE)<<"Inheriting slave Camera"<_clearColor; diff --git a/src/osg/CullSettings.cpp b/src/osg/CullSettings.cpp index 561f8b9a0..85336ba97 100644 --- a/src/osg/CullSettings.cpp +++ b/src/osg/CullSettings.cpp @@ -95,7 +95,7 @@ static ApplicationUsageProxy ApplicationUsageProxyCullSettings_e1(ApplicationUsa void CullSettings::readEnvironmentalVariables() { - NOTIFY(osg::INFO)<<"CullSettings::readEnvironmentalVariables()"< &wsref = windowingSystemInterfaceRef(); wsref = callback; - NOTIFY(osg::INFO)<<"GraphicsContext::setWindowingSystemInterface() "< &wsref = windowingSystemInterfaceRef(); - NOTIFY(osg::INFO)<<"GraphicsContext::getWindowingSystemInterface() "<referenceCount()<referenceCount()<second._numContexts = 1; - NOTIFY(osg::INFO)<<"GraphicsContext::createNewContextID() reusing contextID="<first< lock(s_contextIDMapMutex); - NOTIFY(osg::INFO)<<"GraphicsContext::incrementContextIDUsageCount("< lock(s_contextIDMapMutex); @@ -407,7 +407,7 @@ GraphicsContext* GraphicsContext::getOrCreateCompileContext(unsigned int context { OpenThreads::ScopedLock lock(s_contextIDMapMutex); s_contextIDMap[contextID]._compileContext = gc; - NOTIFY(osg::NOTICE)<<" succeeded GraphicsContext::createCompileContext."< 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("<getContextID()="<<_state->getContextID()<getContextID()="<<_state->getContextID()<getContextID()); - NOTIFY(osg::INFO)<<"Done delete of GL objects"<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."<getContextID()); } @@ -661,7 +661,7 @@ void GraphicsContext::setGraphicsThread(GraphicsThread* gt) void GraphicsContext::add(Operation* operation) { - NOTIFY(osg::INFO)<<"Doing add"< lock(_operationsMutex); @@ -674,7 +674,7 @@ void GraphicsContext::add(Operation* operation) void GraphicsContext::remove(Operation* operation) { - NOTIFY(osg::INFO)<<"Doing remove operation"< 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"< lock(_operationsMutex); @@ -715,7 +715,7 @@ void GraphicsContext::remove(const std::string& name) void GraphicsContext::removeAllOperations() { - NOTIFY(osg::INFO)<<"Doing remove all operations"< lock(_operationsMutex); _operations.clear(); @@ -775,7 +775,7 @@ void GraphicsContext::runOperations() if (_currentOperation.valid()) { - // NOTIFY(osg::INFO)<<"Doing op "<<_currentOperation->getName()<<" "<getName()<<" "< OperationQueue::getNextOperation(bool blockIfEmpty) if (!currentOperation->getKeep()) { - // NOTIFY(osg::INFO)<<"removing "<getName()<getName()<set(false); } } else { - // NOTIFY(osg::INFO)<<"increment "<<_currentOperation->getName()<getName()< OperationQueue::getNextOperation(bool blockIfEmpty) void OperationQueue::add(Operation* operation) { - NOTIFY(osg::INFO)<<"Doing add"< lock(_operationsMutex); @@ -115,7 +115,7 @@ void OperationQueue::add(Operation* operation) void OperationQueue::remove(Operation* operation) { - NOTIFY(osg::INFO)<<"Doing remove operation"< lock(_operationsMutex); @@ -138,7 +138,7 @@ void OperationQueue::remove(Operation* operation) void OperationQueue::remove(const std::string& name) { - NOTIFY(osg::INFO)<<"Doing remove named operation"< lock(_operationsMutex); @@ -166,7 +166,7 @@ void OperationQueue::remove(const std::string& name) void OperationQueue::removeAllOperations() { - NOTIFY(osg::INFO)<<"Doing remove all operations"< lock(_operationsMutex); @@ -203,7 +203,7 @@ void OperationQueue::runOperations(Object* callingObject) ++_currentOperationIterator; } - // NOTIFY(osg::INFO)<<"Doing op "<<_currentOperation->getName()<<" "<getName()<<" "< lock(_threadMutex); if (_currentOperation.valid()) { - NOTIFY(osg::INFO)<<"releasing "<<_currentOperation.get()<release(); } } @@ -303,7 +303,7 @@ void OperationThread::setDone(bool done) int OperationThread::cancel() { - NOTIFY(osg::INFO)<<"Cancelling OperationThread "< lock(_threadMutex); @@ -343,13 +343,13 @@ int OperationThread::cancel() } #endif // commenting out debug info as it was cashing crash on exit, presumable - // due to NOTIFY or std::cout destructing earlier than this destructor. - NOTIFY(osg::DEBUG_INFO)<<" Waiting for OperationThread to cancel "< operation; ref_ptr operationQueue; @@ -407,7 +407,7 @@ void OperationThread::run() _currentOperation = operation; } - // NOTIFY(osg::INFO)<<"Doing op "<<_currentOperation->getName()<<" "<getName()<<" "<setMaxTexturePoolSize(size); - NOTIFY(osg::INFO)<<"osg::State::_maxTexturePoolSize="<<_maxTexturePoolSize<= _stateStateStack.size()) { - NOTIFY(osg::NOTICE)<<"Warning: State::removeStateSet("<= _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; - // NOTIFY(osg::NOTICE)<<" _glEnableVertexAttribArray( "<className()<<" "<className()<<" "<className()<<" "<className()<<" "<className()<<" "<className()<<" "<className()<<" "<className()<<" "<className()<<" "<className()<<" "<className()<<" "<className()<<" "<className()<<" "<className()<<" "<65536) { - NOTIFY(osg::NOTICE)<<"Warning: State::drawQuads("<= osg::DEBUG_INFO) { - NOTIFY(osg::DEBUG_INFO) + OSG_NOTIFY(osg::DEBUG_INFO) <<"Found compilable texture " << texture << " "; osg::Image* image = texture->getImage(0); - if (image) NOTIFY(osg::DEBUG_INFO) << image->getFileName(); - NOTIFY(osg::DEBUG_INFO) << std:: endl; + if (image) OSG_NOTIFY(osg::DEBUG_INFO) << image->getFileName(); + OSG_NOTIFY(osg::DEBUG_INFO) << std:: endl; } break; } @@ -217,7 +217,7 @@ public: { case DatabasePager::DO_NOT_MODIFY_DRAWABLE_SETTINGS: // do nothing, leave settings as they came in from loaded database. - // NOTIFY(osg::NOTICE)<<"DO_NOT_MODIFY_DRAWABLE_SETTINGS"<setUseDisplayList(true); @@ -226,12 +226,12 @@ public: case DatabasePager::USE_VERTEX_BUFFER_OBJECTS: drawable->setUseDisplayList(true); drawable->setUseVertexBufferObjects(true); - // NOTIFY(osg::NOTICE)<<"USE_VERTEX_BUFFER_OBJECTS"<setUseDisplayList(false); drawable->setUseVertexBufferObjects(false); - // NOTIFY(osg::NOTICE)<<"USE_VERTEX_ARRAYS"<_requestList.size()= "<_requestList.size()<<" to delete = "<_childrenToDeleteList.size()<_requestList.size()= "<_requestList.size()<<" to delete = "<_childrenToDeleteList.size()<_fileName<_fileName<add(databaseRequest.get()); databaseRequest = 0; } @@ -608,7 +608,7 @@ void DatabasePager::DatabaseThread::run() // load the data, note safe to write to the databaseRequest since once // it is created this thread is the only one to write to the _loadedModel pointer. - //NOTIFY(osg::NOTICE)<<"In DatabasePager thread readNodeFile("<_fileName<<")"<_fileName<<")"<tick(); @@ -618,7 +618,7 @@ void DatabasePager::DatabaseThread::run() Registry::instance()->readNode(databaseRequest->_fileName, databaseRequest->_loadOptions.get(), false); if (rr.validNode()) databaseRequest->_loadedModel = rr.getNode(); - if (rr.error()) NOTIFY(osg::WARN)<<"Error in reading file "<_fileName<<" : "<_fileName<<" : "<_loadedModel.valid() && fileCache.valid() && @@ -630,7 +630,7 @@ void DatabasePager::DatabaseThread::run() if ((_pager->_frameNumber-databaseRequest->_frameNumberLastRequest)>1) { - NOTIFY(osg::INFO)<<_name<<": Warning DatabaseRquest no longer required."<_loadedModel = 0; } @@ -638,11 +638,11 @@ void DatabasePager::DatabaseThread::run() if (!groupForAddingLoadedSubgraph) { - NOTIFY(osg::INFO)<<_name<<": Warning parent of loaded subgraph, deleted."<_loadedModel = 0; } - //NOTIFY(osg::NOTICE)<<" node read in "<delta_m(before,osg::Timer::instance()->tick())<<" ms"<delta_m(before,osg::Timer::instance()->tick())<<" ms"<getKdTreeBuilder()) { //osg::Timer_t before = osg::Timer::instance()->tick(); - //NOTIFY(osg::NOTICE)<<"osgTerrain::GeometryTechnique::build kd tree"< builder = osgDB::Registry::instance()->getKdTreeBuilder()->clone(); for(osg::NodePath::iterator nitr = nodePath.begin(); @@ -762,7 +762,7 @@ void DatabasePager::DatabaseThread::run() databaseRequest->_loadedModel->accept(*builder); //osg::Timer_t after = osg::Timer::instance()->tick(); - //NOTIFY(osg::NOTICE)<<"KdTree build time "<delta_m(before, after)<delta_m(before, after)<_dataToCompileList->_requestList.end(); ++citr) { - NOTIFY(osg::INFO)<<_name<<": pruning from compile list"<_loadedModel = 0; (*citr)->_requestQueue = 0; } @@ -839,7 +839,7 @@ void DatabasePager::DatabaseThread::run() } } - // NOTIFY(osg::NOTICE)<<"Done compiling in paging thread"<startThread(); } @@ -1306,11 +1306,11 @@ void DatabasePager::requestNodeFile(const std::string& fileName,osg::Group* grou { loadOptions = Registry::instance()->getOptions(); - // NOTIFY(osg::NOTICE)<<"Using options from Registry "<_requestQueue; if (requestQueue) @@ -1373,7 +1373,7 @@ void DatabasePager::requestNodeFile(const std::string& fileName,osg::Group* grou if (databaseRequestRef->referenceCount()==1) { - NOTIFY(osg::INFO)<<"DatabasePager::requestNodeFile("<_frameNumberFirstRequest = frameNumber; databaseRequest->_timestampFirstRequest = timestamp; @@ -1393,7 +1393,7 @@ void DatabasePager::requestNodeFile(const std::string& fileName,osg::Group* grou if (!foundEntry) { - NOTIFY(osg::INFO)<<"In DatabasePager::requestNodeFile("< lock(_fileRequestQueue->_requestMutex); @@ -1429,7 +1429,7 @@ void DatabasePager::requestNodeFile(const std::string& fileName,osg::Group* grou { _startThreadCalled = true; _done = false; - NOTIFY(osg::DEBUG_INFO)<<"DatabasePager::startThread()"<getFrameNumber()<<">>>>>>>>>>>>>>>>"<getFrameNumber()<<">>>>>>>>>>>>>>>>"<getFrameNumber(); - } //else NOTIFY(osg::INFO) << "signalBeginFrame >>>>>>>>>>>>>>>>"<>>>>>>>>>>>>>>>"<get(); - // NOTIFY(osg::NOTICE)<<"Merging "<<_frameNumber-(*itr)->_frameNumberLastRequest<_frameNumberLastRequest<getSharedStateManager()) osgDB::Registry::instance()->getSharedStateManager()->share(databaseRequest->_loadedModel.get()); @@ -1542,7 +1542,7 @@ void DatabasePager::addLoadedDataToSceneGraph(const osg::FrameStamp &frameStamp) group->addChild(databaseRequest->_loadedModel.get()); - // NOTIFY(osg::NOTICE)<<"merged subgraph"<_fileName<<" after "<_numOfRequests<<" requests and time="<<(timeStamp-databaseRequest->_timestampFirstRequest)*1000.0<_fileName<<" after "<_numOfRequests<<" requests and time="<<(timeStamp-databaseRequest->_timestampFirstRequest)*1000.0<_timestampFirstRequest; @@ -1556,14 +1556,14 @@ void DatabasePager::addLoadedDataToSceneGraph(const osg::FrameStamp &frameStamp) // reset the loadedModel pointer databaseRequest->_loadedModel = 0; - // NOTIFY(osg::NOTICE)<<"curr = "<delta_m(before,mid)<<"ms,\t"<< osg::Timer::instance()->delta_m(mid,last)<<"ms"<< " objects"<releaseGLObjects(); - NOTIFY(osg::INFO)<<"DatabasePager::removeExpiredSubgraphs(), releasing gl objects"<delta_m(before,osg::Timer::instance()->tick())<<" ms "<delta_m(before,osg::Timer::instance()->tick())<<" ms "<releaseGLObjectsOnExpiredChildren(releaseTime, releaseFrame)) { - NOTIFY(osg::INFO)<<"DatabasePager::removeExpiredSubgraphs(), releasing gl objects"<removeExpiredChildren(expiryTime, expiryFrame, childrenRemoved); @@ -1878,7 +1878,7 @@ void DatabasePager::expiry_removeExpiredSubgraphs(const osg::FrameStamp& frameSt (*critr)->accept(markerVistor); } - // NOTIFY(osg::NOTICE)<<"Children to remove "<updateBlock(); } - // NOTIFY(osg::NOTICE)<<" time 2 "<delta_m(before,osg::Timer::instance()->tick())<<" ms "<delta_m(before,osg::Timer::instance()->tick())<<" ms "<compileAllGLObjects(*(context->getState())); @@ -2020,7 +2020,7 @@ void DatabasePager::compileAllGLObjects(osg::State& state) void DatabasePager::compileGLObjects(osg::State& state, double& availableTime) { - // NOTIFY(osg::NOTICE)<<"DatabasePager::compileGLObjects "<<_frameNumber<get(), state.getContextID()) || (sharedManager && sharedManager->isShared(itr->get()))) { @@ -2097,7 +2097,7 @@ void DatabasePager::compileGLObjects(osg::State& state, double& availableTime) } if (osg::getNotifyLevel() >= osg::DEBUG_INFO && numObjectsCompiled > objTemp) - NOTIFY(osg::DEBUG_INFO)<< _frameNumber << " compiled " + OSG_NOTIFY(osg::DEBUG_INFO)<< _frameNumber << " compiled " << numObjectsCompiled - objTemp << " StateSets" << std::endl; // remove the compiled statesets from the list. @@ -2107,7 +2107,7 @@ void DatabasePager::compileGLObjects(osg::State& state, double& availableTime) if (!dtc.second.empty() && (compileAll || ((elapsedTime+estimatedDrawableDuration)get(), state.getContextID())) { elapsedTime = timer.delta_s(start_tick,timer.tick()); @@ -2133,14 +2133,14 @@ void DatabasePager::compileGLObjects(osg::State& state, double& availableTime) } if (osg::getNotifyLevel() >= osg::DEBUG_INFO && numObjectsCompiled > objTemp) - NOTIFY(osg::DEBUG_INFO)<< _frameNumber << " compiled " + OSG_NOTIFY(osg::DEBUG_INFO)<< _frameNumber << " compiled " << numObjectsCompiled - objTemp << " Drawables" << std::endl; // remove the compiled drawables from the list. dwlist.erase(dwlist.begin(),itr); } - //NOTIFY(osg::INFO)<<"Checking if compiled"< 0) - //NOTIFY(osg::NOTICE)<< _frameNumber << "compiled " << numObjectsCompiled << " objects" << std::endl; + //OSG_NOTIFY(osg::NOTICE)<< _frameNumber << "compiled " << numObjectsCompiled << " objects" << std::endl; if (allCompiled) { // we've compiled all of the current databaseRequest so we can now pop it off the // to compile list and place it on the merge list. - // NOTIFY(osg::NOTICE)<<"All compiled"< lock(_dataToCompileList->_requestMutex); @@ -2195,7 +2195,7 @@ void DatabasePager::compileGLObjects(osg::State& state, double& availableTime) } else { - // NOTIFY(osg::NOTICE)<<"Not all compiled"<readObject(cacheFileName, options); } else @@ -83,11 +83,11 @@ ReaderWriter::WriteResult FileCache::writeObject(const osg::Object& object, cons if (!osgDB::fileExists(path) && !osgDB::makeDirectory(path)) { - NOTIFY(osg::NOTICE)<<"Could not create cache directory: "<writeObject(object, cacheFileName, options); if (result.success()) { @@ -103,7 +103,7 @@ ReaderWriter::ReadResult FileCache::readImage(const std::string& originalFileNam std::string cacheFileName = createCacheFileName(originalFileName); if (!cacheFileName.empty() && osgDB::fileExists(cacheFileName)) { - NOTIFY(osg::INFO)<<"FileCache::readImageFromCache("<readImage(cacheFileName, options); } else @@ -121,11 +121,11 @@ ReaderWriter::WriteResult FileCache::writeImage(const osg::Image& image, const s if (!osgDB::fileExists(path) && !osgDB::makeDirectory(path)) { - NOTIFY(osg::NOTICE)<<"Could not create cache directory: "<writeImage(image, cacheFileName, options); if (result.success()) { @@ -141,7 +141,7 @@ ReaderWriter::ReadResult FileCache::readHeightField(const std::string& originalF std::string cacheFileName = createCacheFileName(originalFileName); if (!cacheFileName.empty() && osgDB::fileExists(cacheFileName)) { - NOTIFY(osg::INFO)<<"FileCache::readHeightFieldFromCache("<readHeightField(cacheFileName, options); } else @@ -159,11 +159,11 @@ ReaderWriter::WriteResult FileCache::writeHeightField(const osg::HeightField& hf if (!osgDB::fileExists(path) && !osgDB::makeDirectory(path)) { - NOTIFY(osg::NOTICE)<<"Could not create cache directory: "<writeHeightField(hf, cacheFileName, options); if (result.success()) { @@ -179,7 +179,7 @@ ReaderWriter::ReadResult FileCache::readNode(const std::string& originalFileName std::string cacheFileName = createCacheFileName(originalFileName); if (!cacheFileName.empty() && osgDB::fileExists(cacheFileName)) { - NOTIFY(osg::INFO)<<"FileCache::readNodeFromCache("<readNode(cacheFileName, options, buildKdTreeIfRequired); } else @@ -197,11 +197,11 @@ ReaderWriter::WriteResult FileCache::writeNode(const osg::Node& node, const std: if (!osgDB::fileExists(path) && !osgDB::makeDirectory(path)) { - NOTIFY(osg::NOTICE)<<"Could not create cache directory: "<writeNode(node, cacheFileName, options); if (result.success()) { @@ -218,7 +218,7 @@ ReaderWriter::ReadResult FileCache::readShader(const std::string& originalFileNa std::string cacheFileName = createCacheFileName(originalFileName); if (!cacheFileName.empty() && osgDB::fileExists(cacheFileName)) { - NOTIFY(osg::INFO)<<"FileCache::readShaderFromCache("<readShader(cacheFileName, options); } else @@ -236,11 +236,11 @@ ReaderWriter::WriteResult FileCache::writeShader(const osg::Shader& shader, cons if (!osgDB::fileExists(path) && !osgDB::makeDirectory(path)) { - NOTIFY(osg::NOTICE)<<"Could not create cache directory: "<writeShader(shader, cacheFileName, options); if (result.success()) { @@ -311,12 +311,12 @@ bool FileCache::removeFileFromBlackListed(const std::string& originalFileName) c bool FileCache::loadDatabaseRevisionsForFile(const std::string& originalFileName) { - NOTIFY(osg::INFO)<<"FileCache::loadDatabaseRevisionsForFile("< dr_local; @@ -328,11 +328,11 @@ bool FileCache::loadDatabaseRevisionsForFile(const std::string& originalFileName ritr != _databaseRevisionsList.end() && !dr_local; ++ritr) { - NOTIFY(osg::INFO)<<" comparing "<<(*ritr)->getName()<<" to "<getName()<<" to "<getName()==revisionsFileName) { - NOTIFY(osg::INFO)<<"Already loaded"< object = osgDB::readObjectFile(cacheFileName); dr_local = dynamic_cast(object.get()); if (dr_local) { - NOTIFY(osg::INFO)<<" loaded local revisions File("<getDatabaseRevision(i); DatabaseRevision* revision_remote = dr_remote->getDatabaseRevision(i); - NOTIFY(osg::INFO)<<" Comparing local "<getName()<<" to remote "<getName()<getName()<<" to remote "<getName()<getName()!=revision_remote->getName()) break; } needToWriteRevisionsFileToDisk = (i!=dr_local->getDatabaseRevisionList().size()); - NOTIFY(osg::INFO)<<"Local and remote revisions are different "<getName()<getName()<get(); - NOTIFY(osg::INFO)<<" now loaded DatabaseRevisions "<getName()<<" FileList contents"<getName()<<" FileList contents"<getFilesAdded()) { FileList* fileList = readFileList(osgDB::concatPaths(revision->getDatabasePath(), revision->getFilesAdded()->getName())); @@ -450,7 +450,7 @@ bool FileCache::loadDatabaseRevisionsForFile(const std::string& originalFileName } else { - NOTIFY(osg::NOTICE)<<" failed to read revisions File, object.get()="<getName()<getName()<(object.get()); if (fileList) { - NOTIFY(osg::INFO)<<" loadeded FileList from remote system "<getName()<getName()<getName()<getName()<empty() ? filename : concatPaths(*itr, filename); path = getRealPath(path); - NOTIFY(osg::DEBUG_INFO) << "FindFileInPath() : trying " << path << " ...\n"; + OSG_NOTIFY(osg::DEBUG_INFO) << "FindFileInPath() : trying " << path << " ...\n"; if(fileExists(path)) { - NOTIFY(osg::DEBUG_INFO) << "FindFileInPath() : USING " << path << "\n"; + OSG_NOTIFY(osg::DEBUG_INFO) << "FindFileInPath() : USING " << path << "\n"; return path; } #ifndef WIN32 @@ -389,7 +389,7 @@ std::string osgDB::findFileInDirectory(const std::string& fileName,const std::st realFileName = getSimpleFileName(fileName); } - NOTIFY(osg::DEBUG_INFO) << "findFileInDirectory() : looking for " << realFileName << " in " << realDirName << "...\n"; + OSG_NOTIFY(osg::DEBUG_INFO) << "findFileInDirectory() : looking for " << realFileName << " in " << realDirName << "...\n"; if (realDirName.empty()) { @@ -534,21 +534,21 @@ osgDB::FileOpResult::Value osgDB::copyFile(const std::string & source, const std { if (source.empty() || destination.empty()) { - NOTIFY(osg::INFO) << "copyFile(): Empty file name." << std::endl; + OSG_NOTIFY(osg::INFO) << "copyFile(): Empty file name." << std::endl; return FileOpResult::BAD_ARGUMENT; } // Check if source and destination are the same if (source == destination || osgDB::getRealPath(source) == osgDB::getRealPath(destination)) { - NOTIFY(osg::INFO) << "copyFile(): Source and destination point to the same file: source=" << source << ", destination=" << destination << std::endl; + OSG_NOTIFY(osg::INFO) << "copyFile(): Source and destination point to the same file: source=" << source << ", destination=" << destination << std::endl; return FileOpResult::SOURCE_EQUALS_DESTINATION; } // Check if source file exists if (!osgDB::fileExists(source)) { - NOTIFY(osg::INFO) << "copyFile(): Source file does not exist: " << source << std::endl; + OSG_NOTIFY(osg::INFO) << "copyFile(): Source file does not exist: " << source << std::endl; return FileOpResult::SOURCE_MISSING; } @@ -556,21 +556,21 @@ osgDB::FileOpResult::Value osgDB::copyFile(const std::string & source, const std osgDB::ifstream fin(source.c_str(), std::ios::in | std::ios::binary); if (!fin) { - NOTIFY(osg::NOTICE) << "copyFile(): Can't read source file: " << source << std::endl; + OSG_NOTIFY(osg::NOTICE) << "copyFile(): Can't read source file: " << source << std::endl; return FileOpResult::SOURCE_NOT_OPENED; // Return success since it's not an output error. } // Ensure the directory exists or else the FBX SDK will fail if (!osgDB::makeDirectoryForFile(destination)) { - NOTIFY(osg::INFO) << "Can't create directory for file '" << destination << "'. Copy may fail creating the file." << std::endl; + OSG_NOTIFY(osg::INFO) << "Can't create directory for file '" << destination << "'. Copy may fail creating the file." << std::endl; } // Open destination file osgDB::ofstream fout(destination.c_str(), std::ios::out | std::ios::binary | std::ios::trunc); if (!fout) { - NOTIFY(osg::NOTICE) << "copyFile(): Can't write destination file: " << destination << std::endl; + OSG_NOTIFY(osg::NOTICE) << "copyFile(): Can't write destination file: " << destination << std::endl; return FileOpResult::DESTINATION_NOT_OPENED; } @@ -585,13 +585,13 @@ osgDB::FileOpResult::Value osgDB::copyFile(const std::string & source, const std if (!fout.good()) { - NOTIFY(osg::NOTICE) << "copyFile(): Error writing destination file: " << destination << std::endl; + OSG_NOTIFY(osg::NOTICE) << "copyFile(): Error writing destination file: " << destination << std::endl; return FileOpResult::WRITE_ERROR; } if (!fin.eof()) { - NOTIFY(osg::NOTICE) << "copyFile(): Error reading source file: " << source << std::endl; + OSG_NOTIFY(osg::NOTICE) << "copyFile(): Error reading source file: " << source << std::endl; return FileOpResult::READ_ERROR; } @@ -687,7 +687,7 @@ osgDB::FileOpResult::Value osgDB::copyFile(const std::string & source, const std } else { - NOTIFY(osg::WARN) << "Could not get application directory " + OSG_NOTIFY(osg::WARN) << "Could not get application directory " "using Win32 API. It will not be searched." << std::endl; } @@ -717,14 +717,14 @@ osgDB::FileOpResult::Value osgDB::copyFile(const std::string & source, const std } else { - NOTIFY(osg::WARN) << "Could not get dll directory " + OSG_NOTIFY(osg::WARN) << "Could not get dll directory " "using Win32 API. It will not be searched." << std::endl; } FreeLibrary(thisModule); } else { - NOTIFY(osg::WARN) << "Could not get dll module handle " + OSG_NOTIFY(osg::WARN) << "Could not get dll module handle " "using Win32 API. Dll directory will not be searched." << std::endl; } } @@ -742,7 +742,7 @@ osgDB::FileOpResult::Value osgDB::copyFile(const std::string & source, const std } else { - NOTIFY(osg::WARN) << "Could not get system directory using " + OSG_NOTIFY(osg::WARN) << "Could not get system directory using " "Win32 API, using default directory." << std::endl; convertStringPathIntoFilePathList("C:\\Windows\\System32", filepath); @@ -763,7 +763,7 @@ osgDB::FileOpResult::Value osgDB::copyFile(const std::string & source, const std } else { - NOTIFY(osg::WARN) << "Could not get Windows directory using " + OSG_NOTIFY(osg::WARN) << "Could not get Windows directory using " "Win32 API, using default directory." << std::endl; convertStringPathIntoFilePathList("C:\\Windows", filepath); convertStringPathIntoFilePathList("C:\\Windows\\System", filepath); @@ -1027,7 +1027,7 @@ osgDB::FileOpResult::Value osgDB::copyFile(const std::string & source, const std } else { - NOTIFY( osg::DEBUG_INFO ) << "Couldn't find the Application Bundle" << std::endl; + OSG_NOTIFY( osg::DEBUG_INFO ) << "Couldn't find the Application Bundle" << std::endl; } // Next, check the User's Application Support folder @@ -1042,13 +1042,13 @@ osgDB::FileOpResult::Value osgDB::copyFile(const std::string & source, const std CFRelease( url ); } else - NOTIFY( osg::DEBUG_INFO ) << "Couldn't create CFURLRef for User's application support Path" << std::endl; + OSG_NOTIFY( osg::DEBUG_INFO ) << "Couldn't create CFURLRef for User's application support Path" << std::endl; url = NULL; } else { - NOTIFY( osg::DEBUG_INFO ) << "Couldn't find the User's Application Support Path" << std::endl; + OSG_NOTIFY( osg::DEBUG_INFO ) << "Couldn't find the User's Application Support Path" << std::endl; } // Next, check the Local System's Application Support Folder @@ -1064,13 +1064,13 @@ osgDB::FileOpResult::Value osgDB::copyFile(const std::string & source, const std CFRelease( url ); } else - NOTIFY( osg::DEBUG_INFO ) << "Couldn't create CFURLRef for local System's ApplicationSupport Path" << std::endl; + OSG_NOTIFY( osg::DEBUG_INFO ) << "Couldn't create CFURLRef for local System's ApplicationSupport Path" << std::endl; url = NULL; } else { - NOTIFY( osg::DEBUG_INFO ) << "Couldn't find the Local System's Application Support Path" << std::endl; + OSG_NOTIFY( osg::DEBUG_INFO ) << "Couldn't find the Local System's Application Support Path" << std::endl; } // Finally, check the Network Application Support Folder @@ -1088,14 +1088,14 @@ osgDB::FileOpResult::Value osgDB::copyFile(const std::string & source, const std CFRelease( url ); } else - NOTIFY( osg::DEBUG_INFO ) << "Couldn't create CFURLRef for network Application Support Path" << std::endl; + OSG_NOTIFY( osg::DEBUG_INFO ) << "Couldn't create CFURLRef for network Application Support Path" << std::endl; url = NULL; } else { // had to comment out as it segfauls the OSX app otherwise - // NOTIFY( osg::DEBUG_INFO ) << "Couldn't find the Network Application Support Path" << std::endl; + // OSG_NOTIFY( osg::DEBUG_INFO ) << "Couldn't find the Network Application Support Path" << std::endl; } } #else @@ -1161,7 +1161,7 @@ osgDB::FileOpResult::Value osgDB::copyFile(const std::string & source, const std } else { - NOTIFY( osg::DEBUG_INFO ) << "Couldn't find the Application Bundle." << std::endl; + OSG_NOTIFY( osg::DEBUG_INFO ) << "Couldn't find the Application Bundle." << std::endl; } } #else diff --git a/src/osgDB/Registry.cpp b/src/osgDB/Registry.cpp index 8bb1a5b10..c034704ec 100644 --- a/src/osgDB/Registry.cpp +++ b/src/osgDB/Registry.cpp @@ -193,7 +193,7 @@ Registry::Registry() if( (ptr = getenv("OSG_EXPIRY_DELAY")) != 0) { _expiryDelay = osg::asciiToDouble(ptr); - NOTIFY(osg::INFO)<<"Registry : Expiry delay = "<<_expiryDelay<className()<<")"<< std::endl; + // OSG_NOTIFY(INFO) << "osg::Registry::addReaderWriter("<className()<<")"<< std::endl; OpenThreads::ScopedLock lock(_pluginMutex); @@ -508,7 +508,7 @@ void Registry::removeReaderWriter(ReaderWriter* rw) { if (rw==0L) return; -// NOTIFY(INFO) << "osg::Registry::removeReaderWriter();"<< std::endl; +// OSG_NOTIFY(INFO) << "osg::Registry::removeReaderWriter();"<< std::endl; OpenThreads::ScopedLock lock(_pluginMutex); @@ -536,7 +536,7 @@ bool Registry::readPluginAliasConfigurationFile( const std::string& file ) std::string fileName = osgDB::findDataFile( file ); if (fileName.empty()) { - NOTIFY( osg::WARN) << "Can't find plugin alias config file \"" << file << "\"." << std::endl; + OSG_NOTIFY( osg::WARN) << "Can't find plugin alias config file \"" << file << "\"." << std::endl; return false; } @@ -544,7 +544,7 @@ bool Registry::readPluginAliasConfigurationFile( const std::string& file ) ifs.open( fileName.c_str() ); if (!ifs.good()) { - NOTIFY( osg::WARN) << "Can't open plugin alias config file \"" << fileName << "\"." << std::endl; + OSG_NOTIFY( osg::WARN) << "Can't open plugin alias config file \"" << fileName << "\"." << std::endl; return false; } @@ -562,7 +562,7 @@ bool Registry::readPluginAliasConfigurationFile( const std::string& file ) if (spIdx == ln.npos) { // mapExt and toExt must be on the same line, separated by a space. - NOTIFY( osg::WARN) << file << ", line " << lineNum << ": Syntax error: missing space in \"" << raw << "\"." << std::endl; + OSG_NOTIFY( osg::WARN) << file << ", line " << lineNum << ": Syntax error: missing space in \"" << raw << "\"." << std::endl; continue; } @@ -699,7 +699,7 @@ bool Registry::closeLibrary(const std::string& fileName) void Registry::closeAllLibraries() { - // NOTIFY(osg::NOTICE)<<"Registry::closeAllLibraries()"< lock(_pluginMutex); _dlList.clear(); } @@ -740,7 +740,7 @@ ReaderWriter* Registry::getReaderWriterForExtension(const std::string& ext) // now look for a plug-in to load the file. std::string libraryName = createLibraryNameForExtension(ext); - NOTIFY(INFO) << "Now checking for plug-in "<status()==ReaderWriter::ReadResult::ERROR_IN_READING_FILE) { - // NOTIFY(osg::NOTICE)<<"Warning: error reading file \""<status()==ReaderWriter::ReadResult::FILE_NOT_FOUND) { - //NOTIFY(osg::NOTICE)<<"Warning: could not find file \""<status()==ReaderWriter::ReadResult::ERROR_IN_READING_FILE) { - // NOTIFY(osg::NOTICE)<<"Warning: error reading file \""<status()==ReaderWriter::ReadResult::FILE_NOT_FOUND) { - // NOTIFY(osg::NOTICE)<<"Warning: could not find file \""<second.first.get())) return ReaderWriter::ReadResult(oitr->second.first.get(), ReaderWriter::ReadResult::FILE_LOADED_FROM_CACHE); else return ReaderWriter::ReadResult("Error file does not contain an osg::Object"); } @@ -1134,12 +1134,12 @@ ReaderWriter::ReadResult Registry::readImplementation(const ReadFunctor& readFun if (rr.validObject()) { // update cache with new entry. - NOTIFY(INFO)<<"Adding to object cache "<tick(); ReaderWriter::ReadResult result = readImplementation(ReadNodeFunctor(fileName, options),Options::CACHE_NODES); osg::Timer_t endTick = osg::Timer::instance()->tick(); - NOTIFY(osg::NOTICE)<<"time to load "<delta_m(startTick, endTick)<<"ms"<delta_m(startTick, endTick)<<"ms"<= 0x070c00 - NOTIFY(osg::NOTICE)<<"Error: libcurl read error, file="< 0 ) { reader = osgDB::Registry::instance()->getReaderWriterForMimeType(mimeType); @@ -415,7 +415,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriterCURL::readFile(ObjectType objectType // If there is still no reader, fail. if ( !reader ) { - NOTIFY(osg::NOTICE)<<"Error: No ReaderWriter for file "<getOptionString().find("noLoadExternalReferenceFiles")==std::string::npos); - NOTIFY(osg::DEBUG_INFO) << "ive::DataInputStream.setLoadExternalReferenceFiles()=" << getLoadExternalReferenceFiles() << std::endl; + OSG_NOTIFY(osg::DEBUG_INFO) << "ive::DataInputStream.setLoadExternalReferenceFiles()=" << getLoadExternalReferenceFiles() << std::endl; } if(!istream){ @@ -167,7 +167,7 @@ DataInputStream::DataInputStream(std::istream* istream, const osgDB::ReaderWrite if ( endianType != OPPOSITE_ENDIAN_TYPE ) { throwException("DataInputStream::DataInputStream(): This file has an unreadable endian type.") ; } - NOTIFY(osg::INFO)<<"DataInputStream::DataInputStream: Reading a byteswapped file" << std::endl ; + OSG_NOTIFY(osg::INFO)<<"DataInputStream::DataInputStream: Reading a byteswapped file" << std::endl ; _byteswap = 1 ; } @@ -184,7 +184,7 @@ DataInputStream::DataInputStream(std::istream* istream, const osgDB::ReaderWrite if (compressionLevel>0) { - NOTIFY(osg::INFO)<<"compressed ive stream"<0) { - NOTIFY(osg::NOTICE) << "Compression not supported in this .ive version." << std::endl; + OSG_NOTIFY(osg::NOTICE) << "Compression not supported in this .ive version." << std::endl; _compressionLevel = 0; } #endif @@ -296,7 +296,7 @@ bool DataOutputStream::compress(std::ostream& fout, const std::string& source) c if (ret == Z_STREAM_ERROR) { - NOTIFY(osg::NOTICE)<<"Z_STREAM_ERROR"<max_error_short) max_error_short = error_short; } - NOTIFY(osg::DEBUG_INFO)<<"maxError "<writeInt(r()); - NOTIFY(osg::DEBUG_INFO) << "image written '" << getFileName()<<"'\t"<writeInt(getInternalTextureFormat()); diff --git a/src/osgPlugins/ive/Uniform.cpp b/src/osgPlugins/ive/Uniform.cpp index 68e126bea..80e17d098 100644 --- a/src/osgPlugins/ive/Uniform.cpp +++ b/src/osgPlugins/ive/Uniform.cpp @@ -134,7 +134,7 @@ void Uniform::write(DataOutputStream* out){ } default: { - NOTIFY(osg::WARN)<<"Warning : uniform "<createLibraryNameForExtension("deprecated_osg"); if (osgDB::Registry::instance()->loadLibrary(filename)==osgDB::Registry::LOADED) { - NOTIFY(osg::NOTICE)<<"Constructor OSGReaderWriter - loaded OK"<createLibraryNameForExtension("serializers_osg"); if (osgDB::Registry::instance()->loadLibrary(filename)==osgDB::Registry::LOADED) { - NOTIFY(osg::NOTICE)<<"Constructor ReaderWriterOSG2 - loaded OK"< builder = osgDB::Registry::instance()->getKdTreeBuilder()->clone(); buffer._geode->accept(*builder); //osg::Timer_t after = osg::Timer::instance()->tick(); - //NOTIFY(osg::NOTICE)<<"KdTree build time "<delta_m(before, after)<delta_m(before, after)<s()<<", "<t()<<")"<s()<<", "<t()<<")"<setFilter(osg::Texture::MIN_FILTER, osg::Texture::LINEAR); } layerToTextureMap[colorLayer] = texture2D; - // NOTIFY(osg::NOTICE)<<"Creating new ImageLayer texture "<s()="<s()<<" image->t()="<t()<s()="<s()<<" image->t()="<t()<setTextureAttributeAndModes(layerNum, texture2D, osg::StateAttribute::ON); @@ -885,7 +885,7 @@ void GeometryTechnique::traverse(osg::NodeVisitor& nv) if (_terrainTile->getDirty()) { - NOTIFY(osg::INFO)<<"******* Doing init ***********"<init(); } diff --git a/src/osgTerrain/Layer.cpp b/src/osgTerrain/Layer.cpp index 919aa4edf..fc3809ee6 100644 --- a/src/osgTerrain/Layer.cpp +++ b/src/osgTerrain/Layer.cpp @@ -212,7 +212,7 @@ bool ImageLayer::transform(float offset, float scale) { if (!_image.valid()) return false; - NOTIFY(osg::INFO)<<"ImageLayer::transform("<getColorMap(); for(osg::TransferFunction1D::ColorMap::iterator itr = newColorMap.begin(); @@ -438,7 +438,7 @@ bool HeightFieldLayer::transform(float offset, float scale) osg::FloatArray* heights = _heightField->getFloatArray(); if (!heights) return false; - NOTIFY(osg::INFO)<<"HeightFieldLayer::transform("<begin(); itr != heights->end(); diff --git a/src/osgTerrain/TerrainTechnique.cpp b/src/osgTerrain/TerrainTechnique.cpp index 9acf05c41..6ad8feb58 100644 --- a/src/osgTerrain/TerrainTechnique.cpp +++ b/src/osgTerrain/TerrainTechnique.cpp @@ -34,24 +34,24 @@ TerrainTechnique::~TerrainTechnique() void TerrainTechnique::init() { - NOTIFY(osg::NOTICE)<osg::Group::traverse(*uv); } void TerrainTechnique::cull(osgUtil::CullVisitor* cv) { - NOTIFY(osg::NOTICE)<osg::Group::traverse(*cv); } void TerrainTechnique::cleanSceneGraph() { - NOTIFY(osg::NOTICE)<(*itr); if (ts) { - NOTIFY(osg::INFO)<<"Assigning terrain system "<tick(); - // NOTIFY(osg::NOTICE)<<"Took "<delta_m(start_t,end_t)<<"ms to test "<delta_m(start_t,end_t)<<"ms to test "<=_computed_znear) { - //NOTIFY(osg::INFO)<<"clamping "<< "znear="<<_computed_znear << " zfar="<<_computed_zfar<= _znear && n3 >= _znear) { - //NOTIFY(osg::NOTICE)<<"Triangle totally beyond znear"<=0.0)?1:0) + ((d2>=0.0)?1:0) + ((d3>=0.0)?1:0); @@ -375,7 +375,7 @@ struct ComputeNearestPointFunctor active_mask = active_mask | selector_mask; } - //NOTIFY(osg::NOTICE)<<"Triangle ok w.r.t plane "< cnpf; cnpf.set(_computed_znear, matrix, &planes); @@ -488,8 +488,8 @@ bool CullVisitor::updateCalculatedNearFar(const osg::Matrix& matrix,const osg::B std::swap(d_near,d_far); if ( !EQUAL_F(d_near, d_far) ) { - NOTIFY(osg::WARN)<<"Warning: CullVisitor::updateCalculatedNearFar(.) near>far in range calculation,"<< std::endl; - NOTIFY(osg::WARN)<<" correcting by swapping values d_near="<far in range calculation,"<< std::endl; + OSG_NOTIFY(osg::WARN)<<" correcting by swapping values d_near="<nd_far) nd_far = d; - NOTIFY(osg::NOTICE)<<"\ti="<far in range calculation,"<< std::endl; - NOTIFY(osg::WARN)<<" correcting by swapping values d_near="<far in range calculation,"<< std::endl; + OSG_NOTIFY(osg::WARN)<<" correcting by swapping values d_near="<=0.0) _computed_znear = d_far; - else NOTIFY(osg::WARN)<<" 1) sett near with dnear="<getName() << "\"" << std::endl; + OSG_NOTIFY(osg::DEBUG_INFO) << " \"" << (*i)->getName() << "\"" << std::endl; } } else @@ -839,7 +839,7 @@ void CullVisitor::apply(Billboard& node) { if (d<_computed_znear) { - if (d<0.0) NOTIFY(osg::WARN)<<"Alerting billboard handling ="<getName() << "\"" << std::endl; + OSG_NOTIFY(osg::DEBUG_INFO) << " \"" << (*i)->getName() << "\"" << std::endl; } } else @@ -1025,7 +1025,7 @@ void CullVisitor::apply(Projection& node) ref_ptr matrix = createOrReuseMatrix(node.getMatrix()); pushProjectionMatrix(matrix.get()); - //NOTIFY(osg::INFO)<<"Push projection "<<*matrix<accept(tsv); @@ -163,7 +163,7 @@ void Optimizer::optimize(osg::Node* node, unsigned int options) if (options & REMOVE_LOADED_PROXY_NODES) { - NOTIFY(osg::INFO)<<"Optimizer::optimize() doing REMOVE_LOADED_PROXY_NODES"<accept(rlpnv); @@ -173,7 +173,7 @@ void Optimizer::optimize(osg::Node* node, unsigned int options) if (options & COMBINE_ADJACENT_LODS) { - NOTIFY(osg::INFO)<<"Optimizer::optimize() doing COMBINE_ADJACENT_LODS"<accept(clv); @@ -182,7 +182,7 @@ void Optimizer::optimize(osg::Node* node, unsigned int options) if (options & OPTIMIZE_TEXTURE_SETTINGS) { - NOTIFY(osg::INFO)<<"Optimizer::optimize() doing OPTIMIZE_TEXTURE_SETTINGS"<accept(cssv); @@ -234,13 +234,13 @@ void Optimizer::optimize(osg::Node* node, unsigned int options) if (options & FLATTEN_STATIC_TRANSFORMS) { - NOTIFY(osg::INFO)<<"Optimizer::optimize() doing FLATTEN_STATIC_TRANSFORMS"<accept(fstv); result = fstv.removeTransforms(node); @@ -255,7 +255,7 @@ void Optimizer::optimize(osg::Node* node, unsigned int options) if (options & FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS) { - NOTIFY(osg::INFO)<<"Optimizer::optimize() doing FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS"<tick(); @@ -274,12 +274,12 @@ void Optimizer::optimize(osg::Node* node, unsigned int options) osg::Timer_t endTick = osg::Timer::instance()->tick(); - NOTIFY(osg::INFO)<<"MERGE_GEODES took "<delta_s(startTick,endTick)<delta_s(startTick,endTick)<accept(mgv); @@ -287,7 +287,7 @@ void Optimizer::optimize(osg::Node* node, unsigned int options) if (options & MAKE_FAST_GEOMETRY) { - NOTIFY(osg::INFO)<<"Optimizer::optimize() doing MAKE_FAST_GEOMETRY"<accept(mgv); @@ -295,7 +295,7 @@ void Optimizer::optimize(osg::Node* node, unsigned int options) if (options & MERGE_GEOMETRY) { - NOTIFY(osg::INFO)<<"Optimizer::optimize() doing MERGE_GEOMETRY"<tick(); @@ -305,12 +305,12 @@ void Optimizer::optimize(osg::Node* node, unsigned int options) osg::Timer_t endTick = osg::Timer::instance()->tick(); - NOTIFY(osg::INFO)<<"MERGE_GEOMETRY took "<delta_s(startTick,endTick)<delta_s(startTick,endTick)<accept(tsv); @@ -319,7 +319,7 @@ void Optimizer::optimize(osg::Node* node, unsigned int options) if (options & REMOVE_REDUNDANT_NODES) { - NOTIFY(osg::INFO)<<"Optimizer::optimize() doing REMOVE_REDUNDANT_NODES"<accept(renv); @@ -340,7 +340,7 @@ void Optimizer::optimize(osg::Node* node, unsigned int options) if (options & SPATIALIZE_GROUPS) { - NOTIFY(osg::INFO)<<"Optimizer::optimize() doing SPATIALIZE_GROUPS"<accept(sv); @@ -458,7 +458,7 @@ void Optimizer::StateVisitor::apply(osg::Geode& geode) void Optimizer::StateVisitor::optimize() { - NOTIFY(osg::INFO) << "Num of StateSet="<<_statesets.size()<< std::endl; + OSG_NOTIFY(osg::INFO) << "Num of StateSet="<<_statesets.size()<< std::endl; { // create map from state attributes to stateset which contain them. @@ -539,15 +539,15 @@ void Optimizer::StateVisitor::optimize() // other. std::sort(attributeList.begin(),attributeList.end(),LessDerefFunctor()); - NOTIFY(osg::INFO) << "state attribute list"<< std::endl; + OSG_NOTIFY(osg::INFO) << "state attribute list"<< std::endl; for(AttributeList::iterator aaitr = attributeList.begin(); aaitr!=attributeList.end(); ++aaitr) { - NOTIFY(osg::INFO) << " "<<*aaitr << " "<<(*aaitr)->className()<< std::endl; + OSG_NOTIFY(osg::INFO) << " "<<*aaitr << " "<<(*aaitr)->className()<< std::endl; } - NOTIFY(osg::INFO) << "searching for duplicate attributes"<< std::endl; + OSG_NOTIFY(osg::INFO) << "searching for duplicate attributes"<< std::endl; // find the duplicates. AttributeList::iterator first_unique = attributeList.begin(); AttributeList::iterator current = first_unique; @@ -556,13 +556,13 @@ void Optimizer::StateVisitor::optimize() { if (**current==**first_unique) { - NOTIFY(osg::INFO) << " found duplicate "<<(*current)->className()<<" first="<<*first_unique<<" current="<<*current<< std::endl; + OSG_NOTIFY(osg::INFO) << " found duplicate "<<(*current)->className()<<" first="<<*first_unique<<" current="<<*current<< std::endl; StateSetList& statesetlist = attributeToStateSetMap[*current]; for(StateSetList::iterator sitr=statesetlist.begin(); sitr!=statesetlist.end(); ++sitr) { - NOTIFY(osg::INFO) << " replace duplicate "<<*current<<" with "<<*first_unique<< std::endl; + OSG_NOTIFY(osg::INFO) << " replace duplicate "<<*current<<" with "<<*first_unique<< std::endl; osg::StateSet* stateset = sitr->first; unsigned int unit = sitr->second; if (unit==NON_TEXTURE_ATTRIBUTE) stateset->setAttribute(*first_unique); @@ -591,15 +591,15 @@ void Optimizer::StateVisitor::optimize() // other. std::sort(uniformList.begin(),uniformList.end(),LessDerefFunctor()); - NOTIFY(osg::INFO) << "state uniform list"<< std::endl; + OSG_NOTIFY(osg::INFO) << "state uniform list"<< std::endl; for(UniformList::iterator uuitr = uniformList.begin(); uuitr!=uniformList.end(); ++uuitr) { - NOTIFY(osg::INFO) << " "<<*uuitr << " "<<(*uuitr)->getName()<< std::endl; + OSG_NOTIFY(osg::INFO) << " "<<*uuitr << " "<<(*uuitr)->getName()<< std::endl; } - NOTIFY(osg::INFO) << "searching for duplicate uniforms"<< std::endl; + OSG_NOTIFY(osg::INFO) << "searching for duplicate uniforms"<< std::endl; // find the duplicates. UniformList::iterator first_unique_uniform = uniformList.begin(); UniformList::iterator current_uniform = first_unique_uniform; @@ -608,13 +608,13 @@ void Optimizer::StateVisitor::optimize() { if ((**current_uniform)==(**first_unique_uniform)) { - NOTIFY(osg::INFO) << " found duplicate uniform "<<(*current_uniform)->getName()<<" first_unique_uniform="<<*first_unique_uniform<<" current_uniform="<<*current_uniform<< std::endl; + OSG_NOTIFY(osg::INFO) << " found duplicate uniform "<<(*current_uniform)->getName()<<" first_unique_uniform="<<*first_unique_uniform<<" current_uniform="<<*current_uniform<< std::endl; StateSetSet& statesetset = uniformToStateSetMap[*current_uniform]; for(StateSetSet::iterator sitr=statesetset.begin(); sitr!=statesetset.end(); ++sitr) { - NOTIFY(osg::INFO) << " replace duplicate "<<*current_uniform<<" with "<<*first_unique_uniform<< std::endl; + OSG_NOTIFY(osg::INFO) << " replace duplicate "<<*current_uniform<<" with "<<*first_unique_uniform<< std::endl; osg::StateSet* stateset = *sitr; stateset->addUniform(*first_unique_uniform); } @@ -644,7 +644,7 @@ void Optimizer::StateVisitor::optimize() // other. std::sort(statesetSortList.begin(),statesetSortList.end(),LessDerefFunctor()); - NOTIFY(osg::INFO) << "searching for duplicate attributes"<< std::endl; + OSG_NOTIFY(osg::INFO) << "searching for duplicate attributes"<< std::endl; // find the duplicates. StateSetSortList::iterator first_unique = statesetSortList.begin(); StateSetSortList::iterator current = first_unique; ++current; @@ -652,13 +652,13 @@ void Optimizer::StateVisitor::optimize() { if (**current==**first_unique) { - NOTIFY(osg::INFO) << " found duplicate "<<(*current)->className()<<" first="<<*first_unique<<" current="<<*current<< std::endl; + OSG_NOTIFY(osg::INFO) << " found duplicate "<<(*current)->className()<<" first="<<*first_unique<<" current="<<*current<< std::endl; ObjectSet& objSet = _statesets[*current]; for(ObjectSet::iterator sitr=objSet.begin(); sitr!=objSet.end(); ++sitr) { - NOTIFY(osg::INFO) << " replace duplicate "<<*current<<" with "<<*first_unique<< std::endl; + OSG_NOTIFY(osg::INFO) << " replace duplicate "<<*current<<" with "<<*first_unique<< std::endl; osg::Object* obj = *sitr; osg::Drawable* drawable = dynamic_cast(obj); if (drawable) @@ -1104,9 +1104,9 @@ bool CollectLowestTransformsVisitor::removeTransforms(osg::Node* nodeWeCannotRem } else { - NOTIFY(osg::WARN)<<"Warning:: during Optimize::CollectLowestTransformsVisitor::removeTransforms(Node*)"<first->className()<first->className()<=2) { - // NOTIFY(osg::NOTICE)<<"Before "< DuplicateList; typedef std::map GeometryDuplicateMap; @@ -1994,14 +1994,14 @@ bool Optimizer::MergeGeometryVisitor::mergeGeode(osg::Geode& geode) geode.removeDrawable(rhs); static int co = 0; - NOTIFY(osg::INFO)<<"merged and removed Geometry "<<++co<divide_distance; bool zAxis = (bb.zMax()-bb.zMin())>divide_distance; - NOTIFY(osg::INFO)<<"Dividing "<className()<<" num children = "<getNumChildren()<<" xAxis="<className()<<" num children = "<getNumChildren()<<" xAxis="<divide_distance; bool zAxis = (bb.zMax()-bb.zMin())>divide_distance; - NOTIFY(osg::INFO)<<"INFO "<className()<<" num drawables = "<getNumDrawables()<<" xAxis="<className()<<" num drawables = "<getNumDrawables()<<" xAxis="<getParents(); if (parents.empty()) { - NOTIFY(osg::INFO)<<" Cannot perform spatialize on root Geode, add a Group above it to allow subdivision."<getNumParents()<getNumParents()<getNumParents()-1;i>0;--i) { @@ -3038,7 +3038,7 @@ bool Optimizer::MergeGeodesVisitor::mergeGeodes(osg::Group& group) // if no geodes then just return. if (geodeDuplicateMap.empty()) return false; - NOTIFY(osg::INFO)<<"mergeGeodes in group '"<_image->getFileName()<<" to see it it'll fit in atlas "<get()<_image->getFileName()<<" to see it it'll fit in atlas "<get()<doesSourceFit(source)) { addedSourceToAtlas = true; @@ -3253,13 +3253,13 @@ void Optimizer::TextureAtlasBuilder::buildAtlas() } else { - NOTIFY(osg::INFO)<<"source "<_image->getFileName()<<" does not fit in atlas "<get()<_image->getFileName()<<" does not fit in atlas "<get()<_image->getFileName()<_image->getFileName()< atlas = new Atlas(_maximumAtlasWidth,_maximumAtlasHeight,_margin); _atlasList.push_back(atlas.get()); @@ -3578,7 +3578,7 @@ bool Optimizer::TextureAtlasBuilder::Atlas::doesSourceFit(Source* source) if ((_x + sourceImage->s() + 2*_margin) <= _maximumAtlasWidth) { // yes it fits :-) - NOTIFY(osg::INFO)<<"Fits in current row"<t() + 2*_margin) <= _maximumAtlasHeight) { // yes it fits :-) - NOTIFY(osg::INFO)<<"Fits in next row"<_image->getFileName()<<" does not fit in atlas "<_image->getFileName()<<" does not fit in atlas "<_image->getFileName()<<" "<<_x<<","<<_y<<" fits in row of atlas "<_image->getFileName()<<" "<<_x<<","<<_y<<" fits in row of atlas "<_x = _x + _margin; @@ -3671,7 +3671,7 @@ bool Optimizer::TextureAtlasBuilder::Atlas::addSource(Source* source) // yes it fits, so add the source to the atlas' list of sources it contains _sourceList.push_back(source); - NOTIFY(osg::INFO)<<"next row insertion, source "<_image->getFileName()<<" "<<_x<<","<<_y<<" fits in row of atlas "<_image->getFileName()<<" "<<_x<<","<<_y<<" fits in row of atlas "<_x = _x + _margin; @@ -3685,12 +3685,12 @@ bool Optimizer::TextureAtlasBuilder::Atlas::addSource(Source* source) _height = _y + sourceImage->t() + 2*_margin; - NOTIFY(osg::INFO)<<"source "<_image->getFileName()<<" "<<_x<<","<<_y<<" fits in row of atlas "<_image->getFileName()<<" "<<_x<<","<<_y<<" fits in row of atlas "<_image->getFileName()<<" does not fit in atlas "<_image->getFileName()<<" does not fit in atlas "<allocateImage(_width,_height,1, _image->getPixelFormat(),_image->getDataType(), _image->getPacking()); @@ -3725,7 +3725,7 @@ void Optimizer::TextureAtlasBuilder::Atlas::copySources() for(unsigned int i=0; i_image->getFileName()<<" to "<_x<<" ,"<_y<_image->s()<<","<_image->t()<_image->getFileName()<<" to "<_x<<" ,"<_y<_image->s()<<","<_image->t()<_image.get(); osg::Image* atlasImage = atlas->_image.get(); @@ -4097,7 +4097,7 @@ void Optimizer::TextureAtlasVisitor::optimize() if (texturesThatRepeatAndAreOutOfRange.count(texture)==0) { // safe to convert into CLAMP wrap mode. - NOTIFY(osg::INFO)<<"Changing wrap mode to CLAMP"<setWrap(osg::Texture2D::WRAP_S, osg::Texture::CLAMP); texture->setWrap(osg::Texture2D::WRAP_T, osg::Texture::CLAMP); } @@ -4206,7 +4206,7 @@ void Optimizer::TextureAtlasVisitor::optimize() { if (s_repeat || t_repeat) { - NOTIFY(osg::NOTICE)<<"Warning!!! shouldn't get here"<setTextureAttribute(unit, newTexture); @@ -4237,7 +4237,7 @@ void Optimizer::TextureAtlasVisitor::optimize() if (canTexMatBeFlattenedToAllDrawables) { - // NOTIFY(osg::NOTICE)<<"All drawables can be flattened "<setTextureAttribute(unit, new osg::TexMat(matrix)); } } @@ -4343,7 +4343,7 @@ void Optimizer::FlattenStaticTransformsDuplicatingSharedSubgraphsVisitor::apply( } else { - NOTIFY(osg::NOTICE) << "No parent for this Group" << std::endl; + OSG_NOTIFY(osg::NOTICE) << "No parent for this Group" << std::endl; } } else @@ -4384,7 +4384,7 @@ void Optimizer::FlattenStaticTransformsDuplicatingSharedSubgraphsVisitor::apply( } else { - NOTIFY(osg::NOTICE) << "No parent for this Group" << std::endl; + OSG_NOTIFY(osg::NOTICE) << "No parent for this Group" << std::endl; } } else @@ -4422,7 +4422,7 @@ void Optimizer::FlattenStaticTransformsDuplicatingSharedSubgraphsVisitor::apply( traverse(*(new_lod.get())); } else - NOTIFY(osg::NOTICE) << "No parent for this LOD" << std::endl; + OSG_NOTIFY(osg::NOTICE) << "No parent for this LOD" << std::endl; } else { @@ -4460,7 +4460,7 @@ void Optimizer::FlattenStaticTransformsDuplicatingSharedSubgraphsVisitor::apply( if(parent_group) parent_group->replaceChild(&geode, new_geode.get()); else - NOTIFY(osg::NOTICE) << "No parent for this Geode" << std::endl; + OSG_NOTIFY(osg::NOTICE) << "No parent for this Geode" << std::endl; transformGeode(*(new_geode.get())); } @@ -4494,7 +4494,7 @@ void Optimizer::FlattenStaticTransformsDuplicatingSharedSubgraphsVisitor::apply( if(parent_group) parent_group->replaceChild(&billboard, new_billboard.get()); else - NOTIFY(osg::NOTICE) << "No parent for this Billboard" << std::endl; + OSG_NOTIFY(osg::NOTICE) << "No parent for this Billboard" << std::endl; transformBillboard(*(new_billboard.get())); } diff --git a/src/osgUtil/RenderStage.cpp b/src/osgUtil/RenderStage.cpp index b4ae5d76a..5a7d2a65d 100644 --- a/src/osgUtil/RenderStage.cpp +++ b/src/osgUtil/RenderStage.cpp @@ -248,8 +248,8 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo) depth = osg::maximum(depth,itr->second.depth()); } - // NOTIFY(osg::NOTICE)<<"RenderStage::runCameraSetUp viewport "<<_viewport->x()<<" "<<_viewport->y()<<" "<<_viewport->width()<<" "<<_viewport->height()<x()<<" "<<_viewport->y()<<" "<<_viewport->width()<<" "<<_viewport->height()< lock(*(_camera->getDataChangeMutex())); @@ -365,7 +365,7 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo) if (colorSamples > samples) { - NOTIFY(WARN) << "Multisample color samples must be less than or " + OSG_NOTIFY(WARN) << "Multisample color samples must be less than or " "equal to samples. Setting color samples equal to samples." << std::endl; colorSamples = samples; } @@ -512,7 +512,7 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo) if (status != GL_FRAMEBUFFER_COMPLETE_EXT) { - NOTIFY(osg::NOTICE)<<"RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x"<glBindFramebuffer(GL_FRAMEBUFFER_EXT, 0); @@ -604,7 +604,7 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo) traits->width = width; traits->height = height; - // NOTIFY(osg::NOTICE)<<"traits = "<width<<" "<height<height<pbuffer = (renderTargetImplementation==osg::Camera::PIXEL_BUFFER || renderTargetImplementation==osg::Camera::PIXEL_BUFFER_RTT); traits->windowDecoration = (renderTargetImplementation==osg::Camera::SEPERATE_WINDOW); @@ -686,14 +686,14 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo) { if (renderTargetImplementation==osg::Camera::SEPERATE_WINDOW) { - NOTIFY(osg::NOTICE)<<"Warning: RenderStage::runCameraSetUp(State&) Window "; + OSG_NOTIFY(osg::NOTICE)<<"Warning: RenderStage::runCameraSetUp(State&) Window "; } else { - NOTIFY(osg::NOTICE)<<"Warning: RenderStage::runCameraSetUp(State&) Pbuffer "; + OSG_NOTIFY(osg::NOTICE)<<"Warning: RenderStage::runCameraSetUp(State&) Pbuffer "; } - NOTIFY(osg::NOTICE)<<"does not support multiple color outputs."<realize()) { - NOTIFY(osg::INFO)<<"RenderStage::runCameraSetUp(State&) Context has been realized "<setReadPBuffer(context.get()); } else { - NOTIFY(osg::INFO)<<"RenderStage::runCameraSetUp(State&) Assigning texture to RenderStage so that it does the copy"<isMultisample()) { - NOTIFY(osg::WARN) << "Attempting to read from a" + OSG_NOTIFY(osg::WARN) << "Attempting to read from a" " multisampled framebuffer object. Set a resolve" " framebuffer on the RenderStage to fix this." << std::endl; } @@ -931,7 +931,7 @@ void RenderStage::drawInner(osg::RenderInfo& renderInfo,RenderLeaf*& previous, b GLenum fbstatus = fbo_ext->glCheckFramebufferStatus(GL_FRAMEBUFFER_EXT); if ( fbstatus != GL_FRAMEBUFFER_COMPLETE_EXT ) { - NOTIFY(osg::NOTICE)<<"RenderStage::drawInner(,) FBO status = 0x"<(object); if (!context) return; - // NOTIFY(osg::NOTICE)<<"DrawInnerOperation operator"<releaseContext(); - // NOTIFY(osg::NOTICE)<<" enclosing state before - "<getState(); useContext = _graphicsContext.get(); @@ -1151,7 +1151,7 @@ void RenderStage::draw(osg::RenderInfo& renderInfo,RenderLeaf*& previous) previous = 0; useContext->makeCurrent(); - // NOTIFY(osg::NOTICE)<<" nested state before - "<getStateSetStackSize()<getStateSetStackSize()<getStateSetStackSize()<getStateSetStackSize()<makeCurrent(); } @@ -1433,7 +1433,7 @@ void RenderStage::setMultisampleResolveFramebufferObject(osg::FrameBufferObject* { if (fbo && fbo->isMultisample()) { - NOTIFY(osg::WARN) << "Resolve framebuffer must not be" + OSG_NOTIFY(osg::WARN) << "Resolve framebuffer must not be" " multisampled." << std::endl; } _resolveFbo = fbo; diff --git a/src/osgViewer/CompositeViewer.cpp b/src/osgViewer/CompositeViewer.cpp index fefc308ce..f78ef0e8a 100644 --- a/src/osgViewer/CompositeViewer.cpp +++ b/src/osgViewer/CompositeViewer.cpp @@ -96,7 +96,7 @@ void CompositeViewer::constructorInit() CompositeViewer::~CompositeViewer() { - NOTIFY(osg::INFO)<<"CompositeViewer::~CompositeViewer()"<close(); } - NOTIFY(osg::INFO)<<"finished CompositeViewer::~CompositeViewer()"< obj = osgDB::readObjectFile(filename); osgViewer::View * view = dynamic_cast(obj.get()); if (view) @@ -329,7 +329,7 @@ void CompositeViewer::setReferenceTime(double time) void CompositeViewer::viewerInit() { - NOTIFY(osg::INFO)<<"CompositeViewer::init()"<setUpViewAcrossAllScreens(); @@ -535,7 +535,7 @@ void CompositeViewer::realize() if (contexts.empty()) { - NOTIFY(osg::NOTICE)<<"CompositeViewer::realize() - failed to set up any windows"<delta_s(_startTick, osg::Timer::instance()->tick()); - // NOTIFY(osg::NOTICE)<<"CompositeViewer::frameEventTraversal()."<get(); - //NOTIFY(osg::NOTICE)<<"event->getGraphicsContext()="<getGraphicsContext()<getGraphicsContext()="<getGraphicsContext()<windowDecoration); useCursor(_traits->useCursor); @@ -377,10 +377,10 @@ bool GraphicsWindowCarbon::realizeImplementation() err = CreateNewWindow(kDocumentWindowClass, attr, &bounds, &_window); if (err) { - NOTIFY(osg::WARN) << "GraphicsWindowCarbon::realizeImplementation() failed creating a window: " << err << std::endl; + OSG_NOTIFY(osg::WARN) << "GraphicsWindowCarbon::realizeImplementation() failed creating a window: " << err << std::endl; return false; } else { - NOTIFY(osg::INFO) << "GraphicsWindowCarbon::realizeImplementation() - window created with bounds(" << bounds.top << ", " << bounds.left << ", " << bounds.bottom << ", " << bounds.right << ")" << std::endl; + OSG_NOTIFY(osg::INFO) << "GraphicsWindowCarbon::realizeImplementation() - window created with bounds(" << bounds.top << ", " << bounds.left << ", " << bounds.bottom << ", " << bounds.right << ")" << std::endl; } } else { @@ -410,7 +410,7 @@ bool GraphicsWindowCarbon::realizeImplementation() if (!_context) { - NOTIFY(osg::WARN) << "GraphicsWindowCarbon::realizeImplementation failed creating a context: " << aglGetError() << std::endl; + OSG_NOTIFY(osg::WARN) << "GraphicsWindowCarbon::realizeImplementation failed creating a context: " << aglGetError() << std::endl; return false; } @@ -441,7 +441,7 @@ bool GraphicsWindowCarbon::realizeImplementation() #endif if (cgerr != kCGLNoError ) { - NOTIFY(osg::INFO) << "GraphicsWindowCarbon:: Multi-threaded OpenGL Execution not available" << std::endl; + OSG_NOTIFY(osg::INFO) << "GraphicsWindowCarbon:: Multi-threaded OpenGL Execution not available" << std::endl; } } @@ -469,12 +469,12 @@ bool GraphicsWindowCarbon::releaseContextImplementation() { if (!_realized) { - NOTIFY(osg::NOTICE)<<"Warning: GraphicsWindow not realized, cannot do makeCurrent."<getCurrentEventState()->setModKeyMask(modifierMask); - NOTIFY(osg::INFO) << "GraphicsWindowCarbon::keyPress" << std::endl; + OSG_NOTIFY(osg::INFO) << "GraphicsWindowCarbon::keyPress" << std::endl; getEventQueue()->keyPress(keychar); break; } case kEventRawKeyUp: { - NOTIFY(osg::INFO) << "GraphicsWindowCarbon::keyPress" << std::endl; + OSG_NOTIFY(osg::INFO) << "GraphicsWindowCarbon::keyPress" << std::endl; //getEventQueue()->getCurrentEventState()->setModKeyMask(modifierMask); getEventQueue()->keyRelease(keychar); break; @@ -940,7 +940,7 @@ void GraphicsWindowCarbon::grabFocus() void GraphicsWindowCarbon::grabFocusIfPointerInWindow() { // TODO: implement - NOTIFY(osg::ALWAYS) << "GraphicsWindowCarbon::grabFocusIfPointerInWindow" << std::endl; + OSG_NOTIFY(osg::ALWAYS) << "GraphicsWindowCarbon::grabFocusIfPointerInWindow" << std::endl; } @@ -951,7 +951,7 @@ void GraphicsWindowCarbon::useCursor(bool cursorOn) _traits->useCursor = cursorOn; DarwinWindowingSystemInterface* wsi = dynamic_cast(osg::GraphicsContext::getWindowingSystemInterface()); if (wsi == NULL) { - NOTIFY(osg::WARN) << "GraphicsWindowCarbon::useCursor :: could not get OSXCarbonWindowingSystemInterface" << std::endl; + OSG_NOTIFY(osg::WARN) << "GraphicsWindowCarbon::useCursor :: could not get OSXCarbonWindowingSystemInterface" << std::endl; return; } @@ -967,7 +967,7 @@ void GraphicsWindowCarbon::useCursor(bool cursorOn) break; } if (err != kCGErrorSuccess) { - NOTIFY(osg::WARN) << "GraphicsWindowCarbon::useCursor failed with " << err << std::endl; + OSG_NOTIFY(osg::WARN) << "GraphicsWindowCarbon::useCursor failed with " << err << std::endl; } } @@ -1001,7 +1001,7 @@ void GraphicsWindowCarbon::setCursor(MouseCursor mouseCursor) break; default: cursor = kThemeArrowCursor; - NOTIFY(osg::WARN) << "GraphicsWindowCarbon::setCursor doesn't implement cursor: type = " << mouseCursor << std::endl; + OSG_NOTIFY(osg::WARN) << "GraphicsWindowCarbon::setCursor doesn't implement cursor: type = " << mouseCursor << std::endl; } _currentCursor = mouseCursor; @@ -1026,7 +1026,7 @@ void GraphicsWindowCarbon::requestWarpPointer(float x,float y) DarwinWindowingSystemInterface* wsi = dynamic_cast(osg::GraphicsContext::getWindowingSystemInterface()); if (wsi == NULL) { - NOTIFY(osg::WARN) << "GraphicsWindowCarbon::useCursor :: could not get OSXCarbonWindowingSystemInterface" << std::endl; + OSG_NOTIFY(osg::WARN) << "GraphicsWindowCarbon::useCursor :: could not get OSXCarbonWindowingSystemInterface" << std::endl; return; } diff --git a/src/osgViewer/GraphicsWindowWin32.cpp b/src/osgViewer/GraphicsWindowWin32.cpp index d02ebe9cb..347c2071e 100644 --- a/src/osgViewer/GraphicsWindowWin32.cpp +++ b/src/osgViewer/GraphicsWindowWin32.cpp @@ -333,7 +333,7 @@ class Win32WindowingSystem : public osg::GraphicsContext::WindowingSystemInterfa static void reportError( const std::string& msg ) { - NOTIFY(osg::WARN) << "Error: " << msg.c_str() << std::endl; + OSG_NOTIFY(osg::WARN) << "Error: " << msg.c_str() << std::endl; } static void reportError( const std::string& msg, unsigned int errorCode ) @@ -349,7 +349,7 @@ static void reportError( const std::string& msg, unsigned int errorCode ) return; } - NOTIFY(osg::WARN) << "Windows Error #" << errorCode << ": " << msg.c_str(); + OSG_NOTIFY(osg::WARN) << "Windows Error #" << errorCode << ": " << msg.c_str(); LPVOID lpMsgBuf; @@ -361,12 +361,12 @@ static void reportError( const std::string& msg, unsigned int errorCode ) 0, NULL)!=0) { - NOTIFY(osg::WARN) << ". Reason: " << LPTSTR(lpMsgBuf) << std::endl; + OSG_NOTIFY(osg::WARN) << ". Reason: " << LPTSTR(lpMsgBuf) << std::endl; ::LocalFree(lpMsgBuf); } else { - NOTIFY(osg::WARN) << std::endl; + OSG_NOTIFY(osg::WARN) << std::endl; } } @@ -792,7 +792,7 @@ bool Win32WindowingSystem::getScreenInformation( const osg::GraphicsContext::Scr { if (si.displayNum>0) { - NOTIFY(osg::WARN) << "Win32WindowingSystem::getScreenInformation() - The screen identifier on the Win32 platform must always use display number 0. Value received was " << si.displayNum << std::endl; + OSG_NOTIFY(osg::WARN) << "Win32WindowingSystem::getScreenInformation() - The screen identifier on the Win32 platform must always use display number 0. Value received was " << si.displayNum << std::endl; return false; } @@ -801,7 +801,7 @@ bool Win32WindowingSystem::getScreenInformation( const osg::GraphicsContext::Scr if (si.screenNum>=static_cast(displayDevices.size())) { - NOTIFY(osg::WARN) << "Win32WindowingSystem::getScreenInformation() - Cannot get information for screen " << si.screenNum << " because it does not exist." << std::endl; + OSG_NOTIFY(osg::WARN) << "Win32WindowingSystem::getScreenInformation() - Cannot get information for screen " << si.screenNum << " because it does not exist." << std::endl; return false; } @@ -844,7 +844,7 @@ void Win32WindowingSystem::getScreenSettings( const osg::GraphicsContext::Screen if (resolution.refreshRate == 0 || resolution.refreshRate == 1) { // Windows specific: 0 and 1 represent the hhardware's default refresh rate. // If someone knows how to get this refresh rate (in Hz)... - NOTIFY(osg::NOTICE) << "Win32WindowingSystem::getScreenSettings() is not fully implemented (cannot retreive the hardware's default refresh rate)."<0) { - NOTIFY(osg::WARN) << "Win32WindowingSystem::enumerateScreenSettings() - The screen identifier on the Win32 platform must always use display number 0. Value received was " << si.displayNum << std::endl; + OSG_NOTIFY(osg::WARN) << "Win32WindowingSystem::enumerateScreenSettings() - The screen identifier on the Win32 platform must always use display number 0. Value received was " << si.displayNum << std::endl; return; } @@ -941,7 +941,7 @@ void Win32WindowingSystem::enumerateScreenSettings(const osg::GraphicsContext::S if (si.screenNum>=static_cast(displayDevices.size())) { - NOTIFY(osg::WARN) << "Win32WindowingSystem::enumerateScreenSettings() - Cannot get information for screen " << si.screenNum << " because it does not exist." << std::endl; + OSG_NOTIFY(osg::WARN) << "Win32WindowingSystem::enumerateScreenSettings() - Cannot get information for screen " << si.screenNum << " because it does not exist." << std::endl; return; } @@ -1517,7 +1517,7 @@ static int ChooseMatchingPixelFormat( HDC hdc, int screenNum, const WGLIntegerAt ::DescribePixelFormat(hdc, pixelFormatIndex ,sizeof(PIXELFORMATDESCRIPTOR),&pixelFormat); if (((pixelFormat.dwFlags & PFD_GENERIC_FORMAT) != 0) && ((pixelFormat.dwFlags & PFD_GENERIC_ACCELERATED) == 0)) { - NOTIFY(osg::WARN) << "Rendering in software: pixelFormatIndex " << pixelFormatIndex << std::endl; + OSG_NOTIFY(osg::WARN) << "Rendering in software: pixelFormatIndex " << pixelFormatIndex << std::endl; } return pixelFormatIndex; } @@ -1562,7 +1562,7 @@ bool GraphicsWindowWin32::setPixelFormat() unsigned int bpp; Win32WindowingSystem::getInterface()->getScreenColorDepth(*_traits.get(), bpp); if (bpp < 32) { - NOTIFY(osg::INFO) << "GraphicsWindowWin32::setPixelFormat() - Display setting is not 32 bit colors, " + OSG_NOTIFY(osg::INFO) << "GraphicsWindowWin32::setPixelFormat() - Display setting is not 32 bit colors, " << bpp << " bits per pixel on screen #" << _traits->screenNum @@ -1585,7 +1585,7 @@ bool GraphicsWindowWin32::setPixelFormat() return false; } - NOTIFY(osg::INFO) << "GraphicsWindowWin32::setPixelFormat() - Found a matching pixel format but without the WGL_SWAP_METHOD_ARB specification for screen #" + OSG_NOTIFY(osg::INFO) << "GraphicsWindowWin32::setPixelFormat() - Found a matching pixel format but without the WGL_SWAP_METHOD_ARB specification for screen #" << _traits->screenNum << std::endl; } @@ -1614,10 +1614,10 @@ HGLRC GraphicsWindowWin32::createContextImplementation() if( OSG_GL3_FEATURES ) { - NOTIFY( osg::INFO ) << "GL3: Attempting to create OpenGL3 context." << std::endl; - NOTIFY( osg::INFO ) << "GL3: version: " << _traits->glContextVersion << std::endl; - NOTIFY( osg::INFO ) << "GL3: context flags: " << _traits->glContextFlags << std::endl; - NOTIFY( osg::INFO ) << "GL3: profile: " << _traits->glContextProfileMask << std::endl; + OSG_NOTIFY( osg::INFO ) << "GL3: Attempting to create OpenGL3 context." << std::endl; + OSG_NOTIFY( osg::INFO ) << "GL3: version: " << _traits->glContextVersion << std::endl; + OSG_NOTIFY( osg::INFO ) << "GL3: context flags: " << _traits->glContextFlags << std::endl; + OSG_NOTIFY( osg::INFO ) << "GL3: profile: " << _traits->glContextProfileMask << std::endl; Win32WindowingSystem::OpenGLContext openGLContext; if( !Win32WindowingSystem::getInterface()->getSampleOpenGLContext( openGLContext, _hdc, _screenOriginX, _screenOriginY ) ) @@ -1645,7 +1645,7 @@ HGLRC GraphicsWindowWin32::createContextImplementation() istr >> major >> dot >> minor; if( major < 3 ) { - NOTIFY( osg::WARN ) << "GL3: Non-GL3 version number: " << _traits->glContextVersion << std::endl; + OSG_NOTIFY( osg::WARN ) << "GL3: Non-GL3 version number: " << _traits->glContextVersion << std::endl; } attribs[ idx++ ] = WGL_CONTEXT_MAJOR_VERSION_ARB; @@ -1672,7 +1672,7 @@ HGLRC GraphicsWindowWin32::createContextImplementation() } else { - NOTIFY( osg::INFO ) << "GL3: context created successfully." << std::endl; + OSG_NOTIFY( osg::INFO ) << "GL3: context created successfully." << std::endl; } } } @@ -1942,7 +1942,7 @@ void GraphicsWindowWin32::grabFocus() { if (!::SetForegroundWindow(_hwnd)) { - NOTIFY(osg::WARN) << "Warning: GraphicsWindowWin32::grabFocus() - Failed grabbing the focus" << std::endl; + OSG_NOTIFY(osg::WARN) << "Warning: GraphicsWindowWin32::grabFocus() - Failed grabbing the focus" << std::endl; } } diff --git a/src/osgViewer/GraphicsWindowX11.cpp b/src/osgViewer/GraphicsWindowX11.cpp index 501b87796..caa2a8ef8 100644 --- a/src/osgViewer/GraphicsWindowX11.cpp +++ b/src/osgViewer/GraphicsWindowX11.cpp @@ -44,12 +44,12 @@ bool checkEGLError(const char* str) EGLint err = eglGetError(); if (err != EGL_SUCCESS) { - NOTIFY(osg::WARN)<<"Warning: "<screenNum ); if (XMatchVisualInfo( _display, _traits->screenNum, depth, TrueColor, _visualInfo )==0) { - NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::createVisualInfo() failed."<displayName().c_str()) << "\"."<displayName().c_str()) << "\"."<displayName().c_str()) <<" has no GLX extension." << std::endl; + OSG_NOTIFY(osg::NOTICE)<<"Error: " << XDisplayName(_traits->displayName().c_str()) <<" has no GLX extension." << std::endl; XCloseDisplay( _display ); _display = 0; @@ -671,7 +671,7 @@ void GraphicsWindowX11::init() } #endif - // NOTIFY(osg::NOTICE)<<"GLX extension, errorBase="<(ev.xclient.data.l[0]) == _deleteWindow) { - NOTIFY(osg::INFO)<<"DeleteWindow event received"<closeWindow(); } } @@ -1100,7 +1100,7 @@ void GraphicsWindowX11::checkEvents() double resizeTime = eventTime; _timeOfLastCheckEvents = getEventQueue()->getTime(); - // NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::checkEvents() : getEventQueue()->getCurrentEventState()->getGraphicsContext()="<getCurrentEventState()->getGraphicsContext()<getCurrentEventState()->getGraphicsContext()="<getCurrentEventState()->getGraphicsContext()<x; int windowY = _traits->y; @@ -1111,7 +1111,7 @@ void GraphicsWindowX11::checkEvents() Time firstEventTime = 0; - // NOTIFY(osg::NOTICE)<<"Check events"<(ev.xclient.data.l[0]) == _deleteWindow) { - NOTIFY(osg::NOTICE)<<"DeleteWindow event received"<closeWindow(eventTime); } } case Expose : - NOTIFY(osg::INFO)<<"Expose x="<mouseMotion(mx, my, eventTime); - // NOTIFY(osg::NOTICE)<<"MotionNotify wx="<request_code << std::endl; - NOTIFY(osg::NOTICE) << "Minor opcode: " << (int)event->minor_code << std::endl; - NOTIFY(osg::NOTICE) << "Error code: " << (int)event->error_code << std::endl; - NOTIFY(osg::NOTICE) << "Request serial: " << event->serial << std::endl; - NOTIFY(osg::NOTICE) << "Current serial: " << NextRequest( display ) - 1 << std::endl; + OSG_NOTIFY(osg::NOTICE) << buffer << std::endl; + OSG_NOTIFY(osg::NOTICE) << "Major opcode: " << (int)event->request_code << std::endl; + OSG_NOTIFY(osg::NOTICE) << "Minor opcode: " << (int)event->minor_code << std::endl; + OSG_NOTIFY(osg::NOTICE) << "Error code: " << (int)event->error_code << std::endl; + OSG_NOTIFY(osg::NOTICE) << "Request serial: " << event->serial << std::endl; + OSG_NOTIFY(osg::NOTICE) << "Current serial: " << NextRequest( display ) - 1 << std::endl; switch( event->error_code ) { case BadValue: - NOTIFY(osg::NOTICE) << " Value: " << event->resourceid << std::endl; + OSG_NOTIFY(osg::NOTICE) << " Value: " << event->resourceid << std::endl; break; case BadAtom: - NOTIFY(osg::NOTICE) << " AtomID: " << event->resourceid << std::endl; + OSG_NOTIFY(osg::NOTICE) << " AtomID: " << event->resourceid << std::endl; break; default: - NOTIFY(osg::NOTICE) << " ResourceID: " << event->resourceid << std::endl; + OSG_NOTIFY(osg::NOTICE) << " ResourceID: " << event->resourceid << std::endl; break; } return 0; @@ -1682,7 +1682,7 @@ class X11WindowingSystemInterface : public osg::GraphicsContext::WindowingSystem // responsibility of the user. bool _setScreen(const osg::GraphicsContext::ScreenIdentifier& si, unsigned int width, unsigned int height, unsigned int colorDepth, double rate) { if (colorDepth>0) - NOTIFY(osg::NOTICE) << "X11WindowingSystemInterface::_setScreen() is not fully implemented (missing depth)."< 0.0f && !rateFound) { - NOTIFY(osg::NOTICE) << "Unable to find valid refresh rate " << rate << " on display \"" << XDisplayName(si.displayName().c_str()) << "\"."<(rate), CurrentTime) != RRSetConfigSuccess) { - NOTIFY(osg::NOTICE) << "Unable to set resolution to " << width << "x" << height << " on display \"" << XDisplayName(si.displayName().c_str()) << "\"."<flushAll(); } - //NOTIFY(osg::NOTICE)<<"~X11WindowingSystemInterface()"<(_camera->getView()); osgDB::DatabasePager* databasePager = view ? view->getDatabasePager() : 0; - // NOTIFY(osg::NOTICE)<<"Drawing buffer "<<_currentDraw<getCamera()->getStats(); osg::State* state = sceneView->getState(); @@ -461,7 +461,7 @@ void Renderer::draw() if (sceneView->getDynamicObjectCount()==0 && state->getDynamicObjectRenderingCompletedCallback()) { - // NOTIFY(osg::NOTICE)<<"Completed in cull"<getDynamicObjectRenderingCompletedCallback()->completed(state); } @@ -515,8 +515,8 @@ void Renderer::draw() osg::Timer_t afterDrawTick = osg::Timer::instance()->tick(); -// NOTIFY(osg::NOTICE)<<"Time wait for draw = "<delta_m(startDrawTick, beforeDrawTick)<setText(""); } diff --git a/src/osgViewer/View.cpp b/src/osgViewer/View.cpp index edb3caf67..591581b78 100644 --- a/src/osgViewer/View.cpp +++ b/src/osgViewer/View.cpp @@ -48,14 +48,14 @@ public: { if (_pathToCoordinateSystemNode.empty()) { - NOTIFY(osg::INFO)<<"Found CoordianteSystemNode node"<getCoordinateSystemNodePath(); @@ -105,19 +105,19 @@ public: // reapply the position. coordinateFrame.setTrans(pos); - NOTIFY(osg::INFO)<<"csn->computeLocalCoordinateFrame(position)* osg::computeLocalToWorld(tmpPath)"<computeLocalCoordinateFrame(position)* osg::computeLocalToWorld(tmpPath)"< initEvent = _eventQueue->createEvent(); initEvent->setEventType(osgGA::GUIEventAdapter::FRAME); @@ -258,7 +258,7 @@ void View::setSceneData(osg::Node* node) if (scene) { - NOTIFY(osg::INFO)<<"View::setSceneData() Sharing scene "<setSceneData(node); @@ -431,7 +431,7 @@ void View::setUpViewAcrossAllScreens() osg::GraphicsContext::WindowingSystemInterface* wsi = osg::GraphicsContext::getWindowingSystemInterface(); if (!wsi) { - NOTIFY(osg::NOTICE)<<"View::setUpViewAcrossAllScreens() : Error, no WindowSystemInterface available, cannot create windows."<(gc.get()); if (gw) { - NOTIFY(osg::INFO)<<" GraphicsWindow has been created successfully."<getEventQueue()->getCurrentEventState()->setWindowRectangle(0, 0, width, height ); } else { - NOTIFY(osg::NOTICE)<<" GraphicsWindow has not been created successfully."<width) / double(traits->height); @@ -542,13 +542,13 @@ void View::setUpViewAcrossAllScreens() osgViewer::GraphicsWindow* gw = dynamic_cast(gc.get()); if (gw) { - NOTIFY(osg::INFO)<<" GraphicsWindow has been created successfully."<getEventQueue()->getCurrentEventState()->setWindowRectangle(traits->x, traits->y, traits->width, traits->height ); } else { - NOTIFY(osg::NOTICE)<<" GraphicsWindow has not been created successfully."<setViewport(new osg::Viewport(0, 0, traits->width, traits->height)); @@ -606,12 +606,12 @@ void View::setUpViewInWindow(int x, int y, int width, int height, unsigned int s osgViewer::GraphicsWindow* gw = dynamic_cast(gc.get()); if (gw) { - NOTIFY(osg::INFO)<<"View::setUpViewOnSingleScreen - GraphicsWindow has been created successfully."<getEventQueue()->getCurrentEventState()->setWindowRectangle(x, y, width, height ); } else { - NOTIFY(osg::NOTICE)<<" GraphicsWindow has not been created successfully."<(gc.get()); if (gw) { - NOTIFY(osg::INFO)<<"View::setUpViewOnSingleScreen - GraphicsWindow has been created successfully."<getEventQueue()->getCurrentEventState()->setWindowRectangle(0, 0, width, height ); } else { - NOTIFY(osg::NOTICE)<<" GraphicsWindow has not been created successfully."< gc = osg::GraphicsContext::createGraphicsContext(traits.get()); if (!gc) { - NOTIFY(osg::NOTICE)<<"GraphicsWindow has not been created successfully."< gc = osg::GraphicsContext::createGraphicsContext(traits.get()); if (!gc) { - NOTIFY(osg::NOTICE)<<"GraphicsWindow has not been created successfully."< gc = osg::GraphicsContext::createGraphicsContext(traits.get()); if (!gc) { - NOTIFY(osg::NOTICE)<<"GraphicsWindow has not been created successfully."<getSceneData() : 0; @@ -1653,7 +1653,7 @@ void View::requestRedraw() } else { - NOTIFY(osg::INFO)<<"View::requestRedraw(), No viewer base has been assigned yet."<getAllowEventFocus() && slave._camera->getRenderTargetImplementation()==osg::Camera::FRAME_BUFFER) { - NOTIFY(osg::INFO)<<"Testing slave camera "<getName()<getName()<getViewport() : 0; @@ -1773,15 +1773,15 @@ const osg::Camera* View::getCameraContainingPosition(float x, float y, float& lo osg::Vec3d new_coord = osg::Vec3d(x,y,0.0) * matrix; - //NOTIFY(osg::NOTICE)<<" x="<getXmin()="<getXmin()<<" eventState->getXmax()="<getXmax()<getXmin()="<getXmin()<<" eventState->getXmax()="<getXmax()<= (viewport->x()-epsilon) && new_coord.y() >= (viewport->y()-epsilon) && new_coord.x() < (viewport->x()+viewport->width()-1.0+epsilon) && new_coord.y() <= (viewport->y()+viewport->height()-1.0+epsilon) ) { - // NOTIFY(osg::NOTICE)<<" in viewport "<x()<<" "<<(viewport->x()+viewport->width())<x()<<" "<<(viewport->x()+viewport->width())< picker = new osgUtil::LineSegmentIntersector(cf, local_x, local_y); #if 0 - NOTIFY(osg::NOTICE)<<"View::computeIntersections(x="<getViewport()->x()<<","<getViewport()->y()<<","<getViewport()->width()<<","<getViewport()->height()<<")"<getViewport()->x()<<","<getViewport()->y()<<","<getViewport()->width()<<","<getViewport()->height()<<")"<getGraphicsContext() ? camera->getGraphicsContext()->getTraits() : 0; if (traits) { - NOTIFY(osg::NOTICE)<<" window ("<x<<","<y<<","<width<<","<height<<")"<x<<","<y<<","<width<<","<height<<")"<delta_m(after_dummy, after_kdTree_2); double timeConventional = osg::Timer::instance()->delta_m(after_kdTree_2, after); - NOTIFY(osg::NOTICE)<<"Using Dummy "<containsIntersections()) diff --git a/src/osgViewer/Viewer.cpp b/src/osgViewer/Viewer.cpp index f7eabc1be..f331693ac 100644 --- a/src/osgViewer/Viewer.cpp +++ b/src/osgViewer/Viewer.cpp @@ -100,7 +100,7 @@ Viewer::Viewer(osg::ArgumentParser& arguments) } else { - NOTIFY(osg::WARN)<<"Invalid clear color \""< object = osgDB::readObjectFile(filename); if (!object) { - //NOTIFY(osg::NOTICE)<<"Error: Unable to load configuration file \""<(object.get()); if (compositeViewer) { - NOTIFY(osg::NOTICE)<<"Error: Config file \""<delta_s(_startTick, osg::Timer::instance()->tick()); - // NOTIFY(osg::NOTICE)<<"Viewer::frameEventTraversal()."<= viewport->x() && y >= viewport->y() && x <= (viewport->x()+viewport->width()) && y <= (viewport->y()+viewport->height()) ) { - // NOTIFY(osg::NOTICE)<<"setCamera with focus "<getName()<<" x="<getName()<<" x="<getEventType()) { case(osgGA::GUIEventAdapter::PUSH): - NOTIFY(osg::NOTICE)<<" PUSH "<getButton()<<" x="<getX()<<" y="<getY()<getButton()<<" x="<getX()<<" y="<getY()<getButton()<<" x="<getX()<<" y="<getY()<getButton()<<" x="<getX()<<" y="<getY()<getButtonMask()<<" x="<getX()<<" y="<getY()<getButtonMask()<<" x="<getX()<<" y="<getY()<getButtonMask()<<" x="<getX()<<" y="<getY()<getButtonMask()<<" x="<getX()<<" y="<getY()<getScrollingMotion()<getScrollingMotion()<getKey()<<"'"<getKey()<<"'"<getKey()<<"'"<getKey()<<"'"<getWindowX()<<"/"<getWindowY()<<" x "<getWindowWidth()<<"/"<getWindowHeight() << std::endl; + OSG_NOTIFY(osg::NOTICE)<<" RESIZE "<getWindowX()<<"/"<getWindowY()<<" x "<getWindowWidth()<<"/"<getWindowHeight() << std::endl; break; case(osgGA::GUIEventAdapter::QUIT_APPLICATION): - NOTIFY(osg::NOTICE)<<" QUIT_APPLICATION " << std::endl; + OSG_NOTIFY(osg::NOTICE)<<" QUIT_APPLICATION " << std::endl; break; case(osgGA::GUIEventAdapter::FRAME): - // NOTIFY(osg::NOTICE)<<" FRAME "<getSceneData()) { - NOTIFY(osg::INFO)<<"Making scene thread safe"<getSceneData()->setThreadSafeRefUnref(true); @@ -392,7 +392,7 @@ void ViewerBase::startThreading() if (!gc->isRealized()) { - NOTIFY(osg::INFO)<<"ViewerBase::startThreading() : Realizng window "<realize(); } @@ -467,7 +467,7 @@ void ViewerBase::startThreading() osg::Camera* camera = *camItr; if (camera->getCameraThread() && !camera->getCameraThread()->isRunning()) { - NOTIFY(osg::INFO)<<" camera->getCameraThread()-> "<getCameraThread()<getCameraThread()-> "<getCameraThread()<getCameraThread()->startThread(); } } @@ -508,7 +508,7 @@ void ViewerBase::startThreading() osg::GraphicsContext* gc = (*citr); if (gc->getGraphicsThread() && !gc->getGraphicsThread()->isRunning()) { - NOTIFY(osg::INFO)<<" gc->getGraphicsThread()->startThread() "<getGraphicsThread()<getGraphicsThread()->startThread() "<getGraphicsThread()<getGraphicsThread()->startThread(); // OpenThreads::Thread::YieldCurrentThread(); } @@ -516,7 +516,7 @@ void ViewerBase::startThreading() _threadsRunning = true; - NOTIFY(osg::INFO)<<"Set up threading"<getCamera()->getInverseViewMatrix(); - NOTIFY(osg::NOTICE)<<"View "<block(); @@ -839,12 +839,12 @@ void ViewerBase::renderingTraversals() { // osg::Timer_t startTick = osg::Timer::instance()->tick(); _endDynamicDrawBlock->block(); - // NOTIFY(osg::NOTICE)<<"Time waiting "<delta_m(startTick, osg::Timer::instance()->tick())<delta_m(startTick, osg::Timer::instance()->tick())<setWindowDecoration(true); window->setWindowRectangle((screenWidth - (int)resolution.x()) / 2, (screenHeight - (int)resolution.y()) / 2, (int)resolution.x(), (int)resolution.y()); - NOTIFY(osg::INFO) << "Screen resolution = " << (int)resolution.x() << "x" << (int)resolution.y() << std::endl; + OSG_NOTIFY(osg::INFO) << "Screen resolution = " << (int)resolution.x() << "x" << (int)resolution.y() << std::endl; } else { @@ -196,7 +196,7 @@ void WindowSizeHandler::changeWindowedResolution(osgViewer::GraphicsWindow *wind if (wsi == NULL) { - NOTIFY(osg::NOTICE) << "Error, no WindowSystemInterface available, cannot toggle window fullscreen." << std::endl; + OSG_NOTIFY(osg::NOTICE) << "Error, no WindowSystemInterface available, cannot toggle window fullscreen." << std::endl; return; } @@ -251,7 +251,7 @@ void WindowSizeHandler::changeWindowedResolution(osgViewer::GraphicsWindow *wind resolution = _resolutionList[_currentResolutionIndex]; window->setWindowDecoration(true); window->setWindowRectangle((screenWidth - (int)resolution.x()) / 2, (screenHeight - (int)resolution.y()) / 2, (int)resolution.x(), (int)resolution.y()); - NOTIFY(osg::INFO) << "Screen resolution = " << (int)resolution.x() << "x" << (int)resolution.y() << std::endl; + OSG_NOTIFY(osg::INFO) << "Screen resolution = " << (int)resolution.x() << "x" << (int)resolution.y() << std::endl; window->grabFocusIfPointerInWindow(); } @@ -330,28 +330,28 @@ bool ThreadingHandler::handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIAction { case(osgViewer::ViewerBase::SingleThreaded): viewerBase->setThreadingModel(osgViewer::ViewerBase::CullDrawThreadPerContext); - NOTIFY(osg::NOTICE)<<"Threading model 'CullDrawThreadPerContext' selected."<setThreadingModel(osgViewer::ViewerBase::DrawThreadPerContext); - NOTIFY(osg::NOTICE)<<"Threading model 'DrawThreadPerContext' selected."<setThreadingModel(osgViewer::ViewerBase::CullThreadPerCameraDrawThreadPerContext); - NOTIFY(osg::NOTICE)<<"Threading model 'CullThreadPerCameraDrawThreadPerContext' selected."<setThreadingModel(osgViewer::ViewerBase::SingleThreaded); - NOTIFY(osg::NOTICE)<<"Threading model 'SingleThreaded' selected."<setThreadingModel(osgViewer::ViewerBase::SingleThreaded); - NOTIFY(osg::NOTICE)<<"Threading model 'SingleThreaded' selected."<setThreadingModel(viewer->suggestBestThreadingModel()); - NOTIFY(osg::NOTICE)<<"Threading model 'AutomaticSelection' selected."<setEndBarrierPosition(osgViewer::Viewer::AfterSwapBuffers); - NOTIFY(osg::NOTICE)<<"Threading model 'AfterSwapBuffers' selected."<setEndBarrierPosition(osgViewer::Viewer::BeforeSwapBuffers); - NOTIFY(osg::NOTICE)<<"Threading model 'BeforeSwapBuffers' selected."<write(out); out.close(); } @@ -585,7 +585,7 @@ bool LODScaleHandler::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionA if (ea.getKey() == _keyEventIncreaseLODScale) { camera->setLODScale(camera->getLODScale()*1.1); - NOTIFY(osg::NOTICE)<<"LODScale = "<getLODScale()<