diff --git a/src/osgViewer/CompositeViewer.cpp b/src/osgViewer/CompositeViewer.cpp index f78ef0e8a..71d06bca5 100644 --- a/src/osgViewer/CompositeViewer.cpp +++ b/src/osgViewer/CompositeViewer.cpp @@ -96,7 +96,7 @@ void CompositeViewer::constructorInit() CompositeViewer::~CompositeViewer() { - OSG_NOTIFY(osg::INFO)<<"CompositeViewer::~CompositeViewer()"<close(); } - OSG_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() { - OSG_NOTIFY(osg::INFO)<<"CompositeViewer::init()"<setUpViewAcrossAllScreens(); @@ -535,7 +535,7 @@ void CompositeViewer::realize() if (contexts.empty()) { - OSG_NOTIFY(osg::NOTICE)<<"CompositeViewer::realize() - failed to set up any windows"<delta_s(_startTick, osg::Timer::instance()->tick()); - // OSG_NOTIFY(osg::NOTICE)<<"CompositeViewer::frameEventTraversal()."<get(); - //OSG_NOTIFY(osg::NOTICE)<<"event->getGraphicsContext()="<getGraphicsContext()<getGraphicsContext()="<getGraphicsContext()< _mainScreenBounds.origin.y) && (_availRect.origin.y > windowBounds.origin.y)) || ((_availRect.origin.x > _mainScreenBounds.origin.x) && (_availRect.origin.x > windowBounds.origin.x)) || @@ -250,7 +250,7 @@ void DarwinWindowingSystemInterface::_init() if( CGGetActiveDisplayList( 0, NULL, &_displayCount ) != CGDisplayNoErr ) { - osg::notify(osg::WARN) << "DarwinWindowingSystemInterface: could not get # of screens" << std::endl; + OSG_WARN << "DarwinWindowingSystemInterface: could not get # of screens" << std::endl; _displayCount = 0; _initialized = true; @@ -261,7 +261,7 @@ void DarwinWindowingSystemInterface::_init() if( CGGetActiveDisplayList( _displayCount, _displayIds, &_displayCount ) != CGDisplayNoErr ) { - osg::notify(osg::WARN) << "DarwinWindowingSystemInterface: CGGetActiveDisplayList failed" << std::endl; + OSG_WARN << "DarwinWindowingSystemInterface: CGGetActiveDisplayList failed" << std::endl; } _initialized = true; @@ -274,7 +274,7 @@ CGDirectDisplayID DarwinWindowingSystemInterface::getDisplayID(const osg::Graphi if (_displayCount==0) { - osg::notify(osg::WARN) << "DarwinWindowingSystemInterface::getDisplayID(..) no valid screens available returning 0 instead." << std::endl; + OSG_WARN << "DarwinWindowingSystemInterface::getDisplayID(..) no valid screens available returning 0 instead." << std::endl; return 0; } @@ -284,7 +284,7 @@ CGDirectDisplayID DarwinWindowingSystemInterface::getDisplayID(const osg::Graphi } else { - osg::notify(osg::WARN) << "DarwinWindowingSystemInterface::getDisplayID(..) invalid screen # " << si.screenNum << ", returning main-screen instead." << std::endl; + OSG_WARN << "DarwinWindowingSystemInterface::getDisplayID(..) invalid screen # " << si.screenNum << ", returning main-screen instead." << std::endl; return _displayIds[0]; } } @@ -368,7 +368,7 @@ void DarwinWindowingSystemInterface::getScreenTopLeft(const osg::GraphicsContext x = static_cast(bounds.origin.x); y = static_cast(bounds.origin.y); - // osg::notify(osg::DEBUG_INFO) << "topleft of screen " << si.screenNum <<" " << bounds.origin.x << "/" << bounds.origin.y << std::endl; + // OSG_DEBUG << "topleft of screen " << si.screenNum <<" " << bounds.origin.x << "/" << bounds.origin.y << std::endl; } diff --git a/src/osgViewer/GraphicsWindowCarbon.cpp b/src/osgViewer/GraphicsWindowCarbon.cpp index d5368d253..8fca9434e 100644 --- a/src/osgViewer/GraphicsWindowCarbon.cpp +++ b/src/osgViewer/GraphicsWindowCarbon.cpp @@ -39,7 +39,7 @@ static pascal OSStatus GraphicsWindowEventHandler(EventHandlerCallRef nextHandle Rect bounds; OSStatus result = eventNotHandledErr; /* report failure by default */ - OSG_NOTIFY(osg::INFO) << "GraphicsWindowEventHandler" << std::endl; + OSG_INFO << "GraphicsWindowEventHandler" << std::endl; GraphicsWindowCarbon* w = (GraphicsWindowCarbon*)userData; if (!w) @@ -247,7 +247,7 @@ void GraphicsWindowCarbon::init() _pixelFormat = PixelBufferCarbon::createPixelFormat(_traits.get()); if (!_pixelFormat) { - OSG_NOTIFY(osg::WARN) << "GraphicsWindowCarbon::init could not create a valid pixelformat" << std::endl; + OSG_WARN << "GraphicsWindowCarbon::init could not create a valid pixelformat" << std::endl; } _valid = (_pixelFormat != NULL); _initialized = true; @@ -276,7 +276,7 @@ bool GraphicsWindowCarbon::setWindowDecorationImplementation(bool flag) if (err != noErr) { - OSG_NOTIFY(osg::WARN) << "GraphicsWindowCarbon::setWindowDecoration failed with " << err << std::endl; + OSG_WARN << "GraphicsWindowCarbon::setWindowDecoration failed with " << err << std::endl; return false; } @@ -349,7 +349,7 @@ bool GraphicsWindowCarbon::realizeImplementation() if (!_initialized) return false; if (!_traits) return false; - osg::notify(osg::INFO) << "GraphicsWindowCarbon::realizeImplementation" << std::endl; + OSG_INFO << "GraphicsWindowCarbon::realizeImplementation" << std::endl; setWindowDecoration(_traits->windowDecoration); useCursor(_traits->useCursor); @@ -376,10 +376,10 @@ bool GraphicsWindowCarbon::realizeImplementation() err = CreateNewWindow(kDocumentWindowClass, attr, &bounds, &_window); if (err) { - OSG_NOTIFY(osg::WARN) << "GraphicsWindowCarbon::realizeImplementation: failed to create window: " << err << std::endl; + OSG_WARN << "GraphicsWindowCarbon::realizeImplementation: failed to create window: " << err << std::endl; return false; } else { - OSG_NOTIFY(osg::INFO) << "GraphicsWindowCarbon::realizeImplementation: window created with bounds(" << bounds.top << ", " << bounds.left << ", " << bounds.bottom << ", " << bounds.right << ")" << std::endl; + OSG_INFO << "GraphicsWindowCarbon::realizeImplementation: window created with bounds(" << bounds.top << ", " << bounds.left << ", " << bounds.bottom << ", " << bounds.right << ")" << std::endl; } } else { @@ -407,7 +407,7 @@ bool GraphicsWindowCarbon::realizeImplementation() _context = aglCreateContext (_pixelFormat, sharedContextCarbon); if (!_context) { - OSG_NOTIFY(osg::WARN) << "GraphicsWindowCarbon::realizeImplementation: failed to create context: " << aglGetError() << std::endl; + OSG_WARN << "GraphicsWindowCarbon::realizeImplementation: failed to create context: " << aglGetError() << std::endl; return false; } @@ -438,7 +438,7 @@ bool GraphicsWindowCarbon::realizeImplementation() #endif if (cgerr != kCGLNoError ) { - OSG_NOTIFY(osg::INFO) << "GraphicsWindowCarbon::realizeImplementation: multi-threaded OpenGL Execution not available" << std::endl; + OSG_INFO << "GraphicsWindowCarbon::realizeImplementation: multi-threaded OpenGL Execution not available" << std::endl; } } @@ -467,12 +467,12 @@ bool GraphicsWindowCarbon::releaseContextImplementation() { if (!_realized) { - OSG_NOTIFY(osg::NOTICE)<<"Warning: GraphicsWindow not realized, cannot do makeCurrent."<vsync; GLint swap = (on ? 1 : 0); aglSetInteger (_context, AGL_SWAP_INTERVAL, &swap); - osg::notify(osg::NOTICE) << "GraphicsWindowCarbon: VSync=" << (on ? "on" : "off") << std::endl; + OSG_NOTICE << "GraphicsWindowCarbon: VSync=" << (on ? "on" : "off") << std::endl; _currentVSync = on; } @@ -748,7 +748,7 @@ bool GraphicsWindowCarbon::handleKeyboardEvent(EventRef theEvent) UInt32 rawkey; GetEventParameter (theEvent,kEventParamKeyCode,typeUInt32, NULL,sizeof(rawkey), NULL,&rawkey); - // OSG_NOTIFY(osg::INFO) << "key code: " << rawkey << " modifiers: " << modifierKeys << std::endl; + // OSG_INFO << "key code: " << rawkey << " modifiers: " << modifierKeys << std::endl; UInt32 dataSize; /* jbw check return status so that we don't allocate a huge array */ @@ -766,16 +766,16 @@ bool GraphicsWindowCarbon::handleKeyboardEvent(EventRef theEvent) case kEventRawKeyDown: case kEventRawKeyRepeat: { - //osg::notify(osg::INFO) << "GraphicsWindowCarbon::keyPress Up" << std::endl; + //OSG_INFO << "GraphicsWindowCarbon::keyPress Up" << std::endl; //getEventQueue()->getCurrentEventState()->setModKeyMask(modifierMask); - //OSG_NOTIFY(osg::INFO) << "GraphicsWindowCarbon::keyPress" << std::endl; + //OSG_INFO << "GraphicsWindowCarbon::keyPress" << std::endl; getEventQueue()->keyPress(keychar); break; } case kEventRawKeyUp: { - //OSG_NOTIFY(osg::INFO) << "GraphicsWindowCarbon::keyPress" << std::endl; + //OSG_INFO << "GraphicsWindowCarbon::keyPress" << std::endl; //getEventQueue()->getCurrentEventState()->setModKeyMask(modifierMask); getEventQueue()->keyRelease(keychar); break; @@ -958,14 +958,14 @@ void GraphicsWindowCarbon::useCursor(bool cursorOn) _traits->useCursor = cursorOn; DarwinWindowingSystemInterface* wsi = dynamic_cast(osg::GraphicsContext::getWindowingSystemInterface()); if (wsi == NULL) { - OSG_NOTIFY(osg::WARN) << "GraphicsWindowCarbon::useCursor: could not get OSXCarbonWindowingSystemInterface" << std::endl; + OSG_WARN << "GraphicsWindowCarbon::useCursor: could not get OSXCarbonWindowingSystemInterface" << std::endl; return; } CGDirectDisplayID displayId = wsi->getDisplayID((*_traits)); CGDisplayErr err = (cursorOn ? CGDisplayShowCursor(displayId) : CGDisplayHideCursor(displayId)); if (err != kCGErrorSuccess) { - OSG_NOTIFY(osg::WARN) << "GraphicsWindowCarbon::useCursor: failed with " << err << std::endl; + OSG_WARN << "GraphicsWindowCarbon::useCursor: failed with " << err << std::endl; } } @@ -1000,7 +1000,7 @@ void GraphicsWindowCarbon::setCursor(MouseCursor mouseCursor) break; default: cursor = kThemeArrowCursor; - OSG_NOTIFY(osg::WARN) << "GraphicsWindowCarbon::setCursor doesn't implement cursor: type = " << mouseCursor << std::endl; + OSG_WARN << "GraphicsWindowCarbon::setCursor doesn't implement cursor: type = " << mouseCursor << std::endl; } _currentCursor = mouseCursor; @@ -1031,7 +1031,7 @@ void GraphicsWindowCarbon::requestWarpPointer(float x,float y) DarwinWindowingSystemInterface* wsi = dynamic_cast(osg::GraphicsContext::getWindowingSystemInterface()); if (wsi == NULL) { - OSG_NOTIFY(osg::WARN) << "GraphicsWindowCarbon::useCursor: could not get OSXCarbonWindowingSystemInterface" << std::endl; + OSG_WARN << "GraphicsWindowCarbon::useCursor: could not get OSXCarbonWindowingSystemInterface" << std::endl; return; } diff --git a/src/osgViewer/GraphicsWindowCocoa.mm b/src/osgViewer/GraphicsWindowCocoa.mm index eb2b25899..7697caf27 100755 --- a/src/osgViewer/GraphicsWindowCocoa.mm +++ b/src/osgViewer/GraphicsWindowCocoa.mm @@ -923,14 +923,14 @@ bool GraphicsWindowCocoa::realizeImplementation() } - osg::notify(osg::DEBUG_INFO) << "GraphicsWindowCocoa::realizeImplementation / ownsWindow: " << _ownsWindow << " checkForEvents: " << _checkForEvents << std::endl; + OSG_DEBUG << "GraphicsWindowCocoa::realizeImplementation / ownsWindow: " << _ownsWindow << " checkForEvents: " << _checkForEvents << std::endl; if (_ownsWindow) { _window = [[GraphicsWindowCocoaWindow alloc] initWithContentRect: rect styleMask: style backing: NSBackingStoreBuffered defer: NO]; if (!_window) { - osg::notify(osg::WARN) << "GraphicsWindowCocoa::realizeImplementation :: could not create window" << std::endl; + OSG_WARN << "GraphicsWindowCocoa::realizeImplementation :: could not create window" << std::endl; return false; } @@ -983,7 +983,7 @@ bool GraphicsWindowCocoa::realizeImplementation() _context = [[NSOpenGLContext alloc] initWithFormat: _pixelformat shareContext: sharedContext]; if (!_context) { - osg::notify(osg::WARN) << "GraphicsWindowCocoa::realizeImplementation :: could not create context" << std::endl; + OSG_WARN << "GraphicsWindowCocoa::realizeImplementation :: could not create context" << std::endl; return false; } GraphicsWindowCocoaGLView* theView = [[ GraphicsWindowCocoaGLView alloc ] initWithFrame:[ _window frame ] ]; @@ -991,7 +991,7 @@ bool GraphicsWindowCocoa::realizeImplementation() [theView setGraphicsWindowCocoa: this]; [theView setOpenGLContext:_context]; _view = theView; - osg::notify(osg::DEBUG_INFO) << "GraphicsWindowCocoa::realizeImplementation / view: " << theView << std::endl; + OSG_DEBUG << "GraphicsWindowCocoa::realizeImplementation / view: " << theView << std::endl; if (_ownsWindow) { [_window setContentView: theView]; @@ -1194,7 +1194,7 @@ void GraphicsWindowCocoa::grabFocus() // ---------------------------------------------------------------------------------------------------------- void GraphicsWindowCocoa::grabFocusIfPointerInWindow() { - osg::notify(osg::INFO) << "GraphicsWindowCocoa :: grabFocusIfPointerInWindow not implemented yet " << std::endl; + OSG_INFO << "GraphicsWindowCocoa :: grabFocusIfPointerInWindow not implemented yet " << std::endl; } @@ -1300,7 +1300,7 @@ void GraphicsWindowCocoa::useCursor(bool cursorOn) _traits->useCursor = cursorOn; DarwinWindowingSystemInterface* wsi = dynamic_cast(osg::GraphicsContext::getWindowingSystemInterface()); if (wsi == NULL) { - osg::notify(osg::WARN) << "GraphicsWindowCarbon::useCursor :: could not get OSXCarbonWindowingSystemInterface" << std::endl; + OSG_WARN << "GraphicsWindowCarbon::useCursor :: could not get OSXCarbonWindowingSystemInterface" << std::endl; return; } @@ -1316,7 +1316,7 @@ void GraphicsWindowCocoa::useCursor(bool cursorOn) break; } if (err != kCGErrorSuccess) { - osg::notify(osg::WARN) << "GraphicsWindowCocoa::useCursor failed with " << err << std::endl; + OSG_WARN << "GraphicsWindowCocoa::useCursor failed with " << err << std::endl; } } @@ -1349,7 +1349,7 @@ void GraphicsWindowCocoa::setCursor(MouseCursor mouseCursor) break; default: - osg::notify(osg::INFO) << "GraphicsWindowCocoa::setCursor :: unsupported MouseCursor: " << mouseCursor << std::endl; + OSG_INFO << "GraphicsWindowCocoa::setCursor :: unsupported MouseCursor: " << mouseCursor << std::endl; } [localPool release]; @@ -1399,7 +1399,7 @@ struct CocoaWindowingSystemInterface : public DarwinWindowingSystemInterface if (s_inited) return; s_inited = true; - osg::notify(osg::INFO) << "CocoaWindowingSystemInterface::initAsStandaloneApplication " << std::endl; + OSG_INFO << "CocoaWindowingSystemInterface::initAsStandaloneApplication " << std::endl; ProcessSerialNumber psn; if (!GetCurrentProcess(&psn)) { diff --git a/src/osgViewer/GraphicsWindowWin32.cpp b/src/osgViewer/GraphicsWindowWin32.cpp index ef82227e6..0a8a2bf7f 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 ) { - OSG_NOTIFY(osg::WARN) << "Error: " << msg.c_str() << std::endl; + 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; } - OSG_NOTIFY(osg::WARN) << "Windows Error #" << errorCode << ": " << msg.c_str(); + 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) { - OSG_NOTIFY(osg::WARN) << ". Reason: " << LPTSTR(lpMsgBuf) << std::endl; + OSG_WARN << ". Reason: " << LPTSTR(lpMsgBuf) << std::endl; ::LocalFree(lpMsgBuf); } else { - OSG_NOTIFY(osg::WARN) << std::endl; + OSG_WARN << std::endl; } } @@ -792,7 +792,7 @@ bool Win32WindowingSystem::getScreenInformation( const osg::GraphicsContext::Scr { if (si.displayNum>0) { - 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; + 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())) { - OSG_NOTIFY(osg::WARN) << "Win32WindowingSystem::getScreenInformation() - Cannot get information for screen " << si.screenNum << " because it does not exist." << std::endl; + 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)... - OSG_NOTIFY(osg::NOTICE) << "Win32WindowingSystem::getScreenSettings() is not fully implemented (cannot retreive the hardware's default refresh rate)."<0) { - 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; + 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())) { - OSG_NOTIFY(osg::WARN) << "Win32WindowingSystem::enumerateScreenSettings() - Cannot get information for screen " << si.screenNum << " because it does not exist." << std::endl; + 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)) { - OSG_NOTIFY(osg::WARN) << "Rendering in software: pixelFormatIndex " << pixelFormatIndex << std::endl; + 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) { - OSG_NOTIFY(osg::INFO) << "GraphicsWindowWin32::setPixelFormat() - Display setting is not 32 bit colors, " + 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; } - OSG_NOTIFY(osg::INFO) << "GraphicsWindowWin32::setPixelFormat() - Found a matching pixel format but without the WGL_SWAP_METHOD_ARB specification for screen #" + OSG_INFO << "GraphicsWindowWin32::setPixelFormat() - Found a matching pixel format but without the WGL_SWAP_METHOD_ARB specification for screen #" << _traits->screenNum << std::endl; } @@ -1949,7 +1949,7 @@ void GraphicsWindowWin32::grabFocus() { if (!::SetForegroundWindow(_hwnd)) { - OSG_NOTIFY(osg::WARN) << "Warning: GraphicsWindowWin32::grabFocus() - Failed grabbing the focus" << std::endl; + OSG_WARN << "Warning: GraphicsWindowWin32::grabFocus() - Failed grabbing the focus" << std::endl; } } diff --git a/src/osgViewer/GraphicsWindowX11.cpp b/src/osgViewer/GraphicsWindowX11.cpp index f00d465ea..07740a22a 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) { - OSG_NOTIFY(osg::WARN)<<"Warning: "<screenNum ); if (XMatchVisualInfo( _display, _traits->screenNum, depth, TrueColor, _visualInfo )==0) { - OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::createVisualInfo() failed."<displayName().c_str()) << "\"."<displayName().c_str()) << "\"."<displayName().c_str()) <<" has no GLX extension." << std::endl; + OSG_NOTICE<<"Error: " << XDisplayName(_traits->displayName().c_str()) <<" has no GLX extension." << std::endl; XCloseDisplay( _display ); _display = 0; @@ -681,7 +681,7 @@ void GraphicsWindowX11::init() } #endif - // OSG_NOTIFY(osg::NOTICE)<<"GLX extension, errorBase="<(ev.xclient.data.l[0]) == _deleteWindow) { - OSG_NOTIFY(osg::INFO)<<"DeleteWindow event received"<closeWindow(); } } @@ -1118,7 +1118,7 @@ void GraphicsWindowX11::checkEvents() double resizeTime = eventTime; _timeOfLastCheckEvents = getEventQueue()->getTime(); - // OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::checkEvents() : getEventQueue()->getCurrentEventState()->getGraphicsContext()="<getCurrentEventState()->getGraphicsContext()<getCurrentEventState()->getGraphicsContext()="<getCurrentEventState()->getGraphicsContext()<x; int windowY = _traits->y; @@ -1129,7 +1129,7 @@ void GraphicsWindowX11::checkEvents() Time firstEventTime = 0; - // OSG_NOTIFY(osg::NOTICE)<<"Check events"<(ev.xclient.data.l[0]) == _deleteWindow) { - OSG_NOTIFY(osg::NOTICE)<<"DeleteWindow event received"<closeWindow(eventTime); } } case Expose : - OSG_NOTIFY(osg::INFO)<<"Expose x="<mouseMotion(mx, my, eventTime); - // OSG_NOTIFY(osg::NOTICE)<<"MotionNotify wx="<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; + OSG_NOTICE << buffer << std::endl; + OSG_NOTICE << "Major opcode: " << (int)event->request_code << std::endl; + OSG_NOTICE << "Minor opcode: " << (int)event->minor_code << std::endl; + OSG_NOTICE << "Error code: " << (int)event->error_code << std::endl; + OSG_NOTICE << "Request serial: " << event->serial << std::endl; + OSG_NOTICE << "Current serial: " << NextRequest( display ) - 1 << std::endl; switch( event->error_code ) { case BadValue: - OSG_NOTIFY(osg::NOTICE) << " Value: " << event->resourceid << std::endl; + OSG_NOTICE << " Value: " << event->resourceid << std::endl; break; case BadAtom: - OSG_NOTIFY(osg::NOTICE) << " AtomID: " << event->resourceid << std::endl; + OSG_NOTICE << " AtomID: " << event->resourceid << std::endl; break; default: - OSG_NOTIFY(osg::NOTICE) << " ResourceID: " << event->resourceid << std::endl; + OSG_NOTICE << " ResourceID: " << event->resourceid << std::endl; break; } return 0; @@ -1700,7 +1700,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) - OSG_NOTIFY(osg::NOTICE) << "X11WindowingSystemInterface::_setScreen() is not fully implemented (missing depth)."< 0.0f && !rateFound) { - OSG_NOTIFY(osg::NOTICE) << "Unable to find valid refresh rate " << rate << " on display \"" << XDisplayName(si.displayName().c_str()) << "\"."<(rate), CurrentTime) != RRSetConfigSuccess) { - OSG_NOTIFY(osg::NOTICE) << "Unable to set resolution to " << width << "x" << height << " on display \"" << XDisplayName(si.displayName().c_str()) << "\"."<flushAll(); } - //OSG_NOTIFY(osg::NOTICE)<<"~X11WindowingSystemInterface()"<width, _traits->height, _traits->target, GL_RGBA, _traits->level, &(_pbuffer)); if (!_realized) { - osg::notify(osg::WARN) << "PixelBufferCarbon::realizeImplementation() aglCreatePBuffer failed! " << aglErrorString(aglGetError()) << std::endl; + OSG_WARN << "PixelBufferCarbon::realizeImplementation() aglCreatePBuffer failed! " << aglErrorString(aglGetError()) << std::endl; } makeCurrentImplementation(); _realized = aglSetPBuffer(_context, _pbuffer, _traits->face, _traits->level, 0); if (!_realized) { - osg::notify(osg::WARN) << "PixelBufferCarbon::realizeImplementation() aglSetPBuffer failed! " << aglErrorString(aglGetError()) << std::endl; + OSG_WARN << "PixelBufferCarbon::realizeImplementation() aglSetPBuffer failed! " << aglErrorString(aglGetError()) << std::endl; } return _realized; } @@ -147,7 +147,7 @@ bool PixelBufferCarbon::releaseContextImplementation() * Pure virtual - must be implemented by concrate implementations of GraphicsContext. */ void PixelBufferCarbon::bindPBufferToTextureImplementation( GLenum buffer ){ - osg::notify(osg::NOTICE)<<"GraphicsWindow::void bindPBufferToTextureImplementation(..) not implemented."<isValid()) { - OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32::init(), Error: some wgl extensions not supported" << std::endl; + OSG_NOTICE << "PixelBufferWin32::init(), Error: some wgl extensions not supported" << std::endl; return; } @@ -597,28 +597,28 @@ void PixelBufferWin32::init() wgle->wglChoosePixelFormatARB(hdc, &fAttribList[0], NULL, 1, &format, &nformats); if (nformats == 0) { - OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32::init(), Error: Couldn't find a suitable pixel format" << std::endl; + OSG_NOTICE << "PixelBufferWin32::init(), Error: Couldn't find a suitable pixel format" << std::endl; return; } _hwnd = reinterpret_cast(wgle->wglCreatePbufferARB(hdc, format, _traits->width, _traits->height, &bAttribList[0])); if (!_hwnd) { - OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32::init, wglCreatePbufferARB error: " << sysError() << std::endl; + OSG_NOTICE << "PixelBufferWin32::init, wglCreatePbufferARB error: " << sysError() << std::endl; return ; } _hdc = wgle->wglGetPbufferDCARB(reinterpret_cast(_hwnd)); if (!_hdc) { - OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32::init, wglGetPbufferDCARB error: " << sysError() << std::endl; + OSG_NOTICE << "PixelBufferWin32::init, wglGetPbufferDCARB error: " << sysError() << std::endl; return; } _hglrc = wglCreateContext(_hdc); if (!_hglrc) { - OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32::init, wglCreateContext error: " << sysError() << std::endl; + OSG_NOTICE << "PixelBufferWin32::init, wglCreateContext error: " << sysError() << std::endl; return; } @@ -629,9 +629,9 @@ void PixelBufferWin32::init() if (_traits->width != iWidth || _traits->height != iHeight) { - OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32::init(), pbuffer created with different size then requsted" << std::endl; - OSG_NOTIFY(osg::NOTICE) << "\tRequested size (" << _traits->width << "," << _traits->height << ")" << std::endl; - OSG_NOTIFY(osg::NOTICE) << "\tPbuffer size (" << iWidth << "," << iHeight << ")" << std::endl; + OSG_NOTICE << "PixelBufferWin32::init(), pbuffer created with different size then requsted" << std::endl; + OSG_NOTICE << "\tRequested size (" << _traits->width << "," << _traits->height << ")" << std::endl; + OSG_NOTICE << "\tPbuffer size (" << iWidth << "," << iHeight << ")" << std::endl; _traits->width = iWidth; _traits->height = iHeight; } @@ -646,7 +646,7 @@ bool PixelBufferWin32::realizeImplementation() { if (_realized) { - OSG_NOTIFY(osg::NOTICE)<<"PixelBufferWin32::realizeImplementation() Already realized"<getWGLContext(), _hglrc) ) { - OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32::realizeImplementation, wglShareLists error: " << sysError() << std::endl; + OSG_NOTICE << "PixelBufferWin32::realizeImplementation, wglShareLists error: " << sysError() << std::endl; } } } @@ -682,7 +682,7 @@ void PixelBufferWin32::closeImplementation() if ( !wglDeleteContext(_hglrc) ) { - OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32::closeImplementation, wglDeleteContext error: " << sysError() << std::endl; + OSG_NOTICE << "PixelBufferWin32::closeImplementation, wglDeleteContext error: " << sysError() << std::endl; } if (wgle && wgle->isValid()) @@ -692,11 +692,11 @@ void PixelBufferWin32::closeImplementation() if ( !wgle->wglReleasePbufferDCARB(reinterpret_cast(_hwnd), _hdc) ) { - OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32::closeImplementation, wglReleasePbufferDCARB error: " << sysError() << std::endl; + OSG_NOTICE << "PixelBufferWin32::closeImplementation, wglReleasePbufferDCARB error: " << sysError() << std::endl; } if ( !wgle->wglDestroyPbufferARB(reinterpret_cast(_hwnd)) ) { - OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32::closeImplementation, wglDestroyPbufferARB error: " << sysError() << std::endl; + OSG_NOTICE << "PixelBufferWin32::closeImplementation, wglDestroyPbufferARB error: " << sysError() << std::endl; } } } @@ -712,7 +712,7 @@ bool PixelBufferWin32::makeCurrentImplementation() bool result = wglMakeCurrent(_hdc, _hglrc)==TRUE?true:false; if (!result) { - OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: " << sysError() << std::endl; + OSG_NOTICE << "PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: " << sysError() << std::endl; } // If the pbuffer is bound to a texture then release it. This operation requires a current context, so @@ -725,7 +725,7 @@ bool PixelBufferWin32::makeCurrentImplementation() { if ( !wgle->wglReleaseTexImageARB(reinterpret_cast(_hwnd), _boundBuffer) ) { - OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32::makeCurrentImplementation, wglReleaseTexImageARB error: " << sysError() << std::endl; + OSG_NOTICE << "PixelBufferWin32::makeCurrentImplementation, wglReleaseTexImageARB error: " << sysError() << std::endl; } _boundBuffer=0; } @@ -740,7 +740,7 @@ bool PixelBufferWin32::makeContextCurrentImplementation( GraphicsContext* readCo if ( !wgle || !wgle->wglMakeContextCurrentARB ) { - OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32, wglMakeContextCurrentARB not available" << std::endl; + OSG_NOTICE << "PixelBufferWin32, wglMakeContextCurrentARB not available" << std::endl; return false; } @@ -756,7 +756,7 @@ bool PixelBufferWin32::releaseContextImplementation() { if (!_realized) { - OSG_NOTIFY(osg::NOTICE)<<"Warning: GraphicsWindow not realized, cannot do makeCurrent."<wglBindTexImageARB ) { - OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32, wglBindTexImageARB not available" << std::endl; + OSG_NOTICE << "PixelBufferWin32, wglBindTexImageARB not available" << std::endl; return; } @@ -791,12 +791,12 @@ void PixelBufferWin32::bindPBufferToTextureImplementation( GLenum buffer ) { if ( _boundBuffer != 0 && !wgle->wglReleaseTexImageARB(reinterpret_cast(_hwnd), _boundBuffer) ) { - OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32::bindPBufferToTextureImplementation, wglReleaseTexImageARB error: " << sysError() << std::endl; + OSG_NOTICE << "PixelBufferWin32::bindPBufferToTextureImplementation, wglReleaseTexImageARB error: " << sysError() << std::endl; } if ( !wgle->wglBindTexImageARB(reinterpret_cast(_hwnd), bindBuffer) ) { - OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32::bindPBufferToTextureImplementation, wglBindTexImageARB error: " << sysError() << std::endl; + OSG_NOTICE << "PixelBufferWin32::bindPBufferToTextureImplementation, wglBindTexImageARB error: " << sysError() << std::endl; } _boundBuffer = bindBuffer; } diff --git a/src/osgViewer/PixelBufferX11.cpp b/src/osgViewer/PixelBufferX11.cpp index 8fe65282d..7ac59bf30 100644 --- a/src/osgViewer/PixelBufferX11.cpp +++ b/src/osgViewer/PixelBufferX11.cpp @@ -124,7 +124,7 @@ void PixelBufferX11::init() if (!_display) { - osg::notify(osg::NOTICE)<<"Error: Unable to open display \"" << XDisplayName(_traits->displayName().c_str()) << "\"."<displayName().c_str()) << "\"."<displayName().c_str()) <<" has no GLX extension." << std::endl; + OSG_NOTICE<<"Error: " << XDisplayName(_traits->displayName().c_str()) <<" has no GLX extension." << std::endl; XCloseDisplay( _display ); _display = 0; @@ -141,12 +141,12 @@ void PixelBufferX11::init() return; } - // osg::notify(osg::NOTICE)<<"GLX extension, errorBase="<displayName().c_str()) + OSG_NOTICE << "Error: " << XDisplayName(_traits->displayName().c_str()) << " can not query GLX version." << std::endl; XCloseDisplay( _display ); _display = 0; @@ -157,7 +157,7 @@ void PixelBufferX11::init() // Just be paranoid, if we are older than 1.1, we cannot even call glxQueryExtensionString if (major < 1 || (1 == major && minor < 1)) { - osg::notify(osg::NOTICE) << "Error: " << XDisplayName(_traits->displayName().c_str()) + OSG_NOTICE << "Error: " << XDisplayName(_traits->displayName().c_str()) << " GLX version " << major << "." << minor << " is too old." << std::endl; XCloseDisplay( _display ); _display = 0; @@ -186,7 +186,7 @@ void PixelBufferX11::init() if (!haveGLX1_3 && !haveSGIX_pbuffer) { - osg::notify(osg::NOTICE) << "Error: " << XDisplayName(_traits->displayName().c_str()) + OSG_NOTICE << "Error: " << XDisplayName(_traits->displayName().c_str()) << " no Pbuffer support in GLX available." << std::endl; XCloseDisplay( _display ); _display = 0; @@ -203,11 +203,11 @@ void PixelBufferX11::init() _traits->alpha /= 2; _traits->depth /= 2; - osg::notify(osg::INFO)<<"Relaxing traits"<width != iWidth || _traits->height != iHeight) { - osg::notify(osg::NOTICE) << "PixelBufferX11::init(), pbuffer created with different size then requsted" << std::endl; - osg::notify(osg::NOTICE) << "\tRequested size (" << _traits->width << "," << _traits->height << ")" << std::endl; - osg::notify(osg::NOTICE) << "\tPbuffer size (" << iWidth << "," << iHeight << ")" << std::endl; + OSG_NOTICE << "PixelBufferX11::init(), pbuffer created with different size then requsted" << std::endl; + OSG_NOTICE << "\tRequested size (" << _traits->width << "," << _traits->height << ")" << std::endl; + OSG_NOTICE << "\tPbuffer size (" << iWidth << "," << iHeight << ")" << std::endl; _traits->width = iWidth; _traits->height = iHeight; } @@ -301,9 +301,9 @@ void PixelBufferX11::init() if (_traits->width != iWidth || _traits->height != iHeight) { - osg::notify(osg::NOTICE) << "PixelBufferX11::init(), SGIX_pbuffer created with different size then requsted" << std::endl; - osg::notify(osg::NOTICE) << "\tRequested size (" << _traits->width << "," << _traits->height << ")" << std::endl; - osg::notify(osg::NOTICE) << "\tPbuffer size (" << iWidth << "," << iHeight << ")" << std::endl; + OSG_NOTICE << "PixelBufferX11::init(), SGIX_pbuffer created with different size then requsted" << std::endl; + OSG_NOTICE << "\tRequested size (" << _traits->width << "," << _traits->height << ")" << std::endl; + OSG_NOTICE << "\tPbuffer size (" << iWidth << "," << iHeight << ")" << std::endl; _traits->width = iWidth; _traits->height = iHeight; } @@ -314,7 +314,7 @@ void PixelBufferX11::init() if (!_pbuffer) { - osg::notify(osg::NOTICE)<<"Error: Unable to create pbuffer."<(sceneView->getCamera()->getView()); @@ -357,7 +357,7 @@ void Renderer::cull() #if 0 if (sceneView->getDynamicObjectCount()==0 && state->getDynamicObjectRenderingCompletedCallback()) { - // osg::notify(osg::NOTICE)<<"Completed in cull"<getDynamicObjectRenderingCompletedCallback()->completed(state); } #endif @@ -433,21 +433,21 @@ void Renderer::draw() osgViewer::View* view = dynamic_cast(_camera->getView()); osgDB::DatabasePager* databasePager = view ? view->getDatabasePager() : 0; - // OSG_NOTIFY(osg::NOTICE)<<"Drawing buffer "<<_currentDraw<getCamera()->getStats(); osg::State* state = sceneView->getState(); @@ -462,7 +462,7 @@ void Renderer::draw() if (sceneView->getDynamicObjectCount()==0 && state->getDynamicObjectRenderingCompletedCallback()) { - // OSG_NOTIFY(osg::NOTICE)<<"Completed in cull"<getDynamicObjectRenderingCompletedCallback()->completed(state); } @@ -516,8 +516,8 @@ void Renderer::draw() osg::Timer_t afterDrawTick = osg::Timer::instance()->tick(); -// OSG_NOTIFY(osg::NOTICE)<<"Time wait for draw = "<delta_m(startDrawTick, beforeDrawTick)<getGraphicsThread() : 0; - // osg::notify(osg::NOTICE)<<"RenderingOperation"<setFusionDistance(view->getFusionDistanceMode(), view->getFusionDistanceValue()); @@ -689,9 +689,9 @@ void Renderer::flushAndCompile(double currentElapsedFrameTime, osgUtil::SceneVie double compileTime = availableTime - flushTime; #if 0 - OSG_NOTIFY(osg::NOTICE)<<"total availableTime = "<getTraits()->alpha) { - osg::notify(level)<<"ScreenCaptureHandler: Selected GL_RGBA read back format"<s() != _width || image->t() != _height) { - //osg::notify(osg::NOTICE)<<"ScreenCaptureHandler: Allocating image "<allocateImage(_width, _height, 1, _pixelFormat, _type); if (pbo!=0) { - //osg::notify(osg::NOTICE)<<"ScreenCaptureHandler: deleting pbo "<glDeleteBuffers (1, &pbo); pbo = 0; } @@ -314,7 +314,7 @@ void WindowCaptureCallback::ContextData::singlePBO(osg::GLBufferObject::Extensio ext->glBindBuffer(GL_PIXEL_PACK_BUFFER_ARB, pbo); ext->glBufferData(GL_PIXEL_PACK_BUFFER_ARB, image->getTotalSizeInBytes(), 0, GL_STREAM_READ); - //osg::notify(osg::NOTICE)<<"ScreenCaptureHandler: Generating pbo "<s() != _width || image->t() != _height) { - //osg::notify(osg::NOTICE)<<"ScreenCaptureHandler: Allocating image "<allocateImage(_width, _height, 1, _pixelFormat, _type); if (read_pbo!=0) { - //osg::notify(osg::NOTICE)<<"ScreenCaptureHandler: deleting pbo "<glDeleteBuffers (1, &read_pbo); read_pbo = 0; } if (copy_pbo!=0) { - //osg::notify(osg::NOTICE)<<"ScreenCaptureHandler: deleting pbo "<glDeleteBuffers (1, ©_pbo); copy_pbo = 0; } @@ -399,7 +399,7 @@ void WindowCaptureCallback::ContextData::multiPBO(osg::GLBufferObject::Extension ext->glBindBuffer(GL_PIXEL_PACK_BUFFER_ARB, copy_pbo); ext->glBufferData(GL_PIXEL_PACK_BUFFER_ARB, image->getTotalSizeInBytes(), 0, GL_STREAM_READ); - //osg::notify(osg::NOTICE)<<"ScreenCaptureHandler: Generating pbo "<glBindBuffer(GL_PIXEL_PACK_BUFFER_ARB, read_pbo); ext->glBufferData(GL_PIXEL_PACK_BUFFER_ARB, image->getTotalSizeInBytes(), 0, GL_STREAM_READ); - //osg::notify(osg::NOTICE)<<"ScreenCaptureHandler: Generating pbo "<getViewerStats()) { - osg::notify(osg::NOTICE)< StatsList; StatsList statsList; statsList.push_back(viewer->getViewerStats()); @@ -223,7 +223,7 @@ bool StatsHandler::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdap if (itr==statsList.begin()) (*itr)->report(osg::notify(osg::NOTICE), i); else (*itr)->report(osg::notify(osg::NOTICE), i, " "); } - osg::notify(osg::NOTICE)<setText(""); } diff --git a/src/osgViewer/View.cpp b/src/osgViewer/View.cpp index b59645a82..1fe9b52c1 100644 --- a/src/osgViewer/View.cpp +++ b/src/osgViewer/View.cpp @@ -48,14 +48,14 @@ public: { if (_pathToCoordinateSystemNode.empty()) { - OSG_NOTIFY(osg::DEBUG_INFO)<<"Found CoordianteSystemNode node"<getCoordinateSystemNodePath(); @@ -105,19 +105,19 @@ public: // reapply the position. coordinateFrame.setTrans(pos); - OSG_NOTIFY(osg::DEBUG_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) { - OSG_NOTIFY(osg::INFO)<<"View::setSceneData() Sharing scene "<setSceneData(node); @@ -423,7 +423,7 @@ void View::setUpViewAcrossAllScreens() osg::GraphicsContext::WindowingSystemInterface* wsi = osg::GraphicsContext::getWindowingSystemInterface(); if (!wsi) { - OSG_NOTIFY(osg::NOTICE)<<"View::setUpViewAcrossAllScreens() : Error, no WindowSystemInterface available, cannot create windows."<(gc.get()); if (gw) { - OSG_NOTIFY(osg::INFO)<<" GraphicsWindow has been created successfully."<getEventQueue()->getCurrentEventState()->setWindowRectangle(0, 0, width, height ); } else { - OSG_NOTIFY(osg::NOTICE)<<" GraphicsWindow has not been created successfully."<width) / double(traits->height); @@ -534,13 +534,13 @@ void View::setUpViewAcrossAllScreens() osgViewer::GraphicsWindow* gw = dynamic_cast(gc.get()); if (gw) { - OSG_NOTIFY(osg::INFO)<<" GraphicsWindow has been created successfully."<getEventQueue()->getCurrentEventState()->setWindowRectangle(traits->x, traits->y, traits->width, traits->height ); } else { - OSG_NOTIFY(osg::NOTICE)<<" GraphicsWindow has not been created successfully."<setViewport(new osg::Viewport(0, 0, traits->width, traits->height)); @@ -598,12 +598,12 @@ void View::setUpViewInWindow(int x, int y, int width, int height, unsigned int s osgViewer::GraphicsWindow* gw = dynamic_cast(gc.get()); if (gw) { - OSG_NOTIFY(osg::INFO)<<"View::setUpViewOnSingleScreen - GraphicsWindow has been created successfully."<getEventQueue()->getCurrentEventState()->setWindowRectangle(x, y, width, height ); } else { - OSG_NOTIFY(osg::NOTICE)<<" GraphicsWindow has not been created successfully."<(gc.get()); if (gw) { - OSG_NOTIFY(osg::INFO)<<"View::setUpViewOnSingleScreen - GraphicsWindow has been created successfully."<getEventQueue()->getCurrentEventState()->setWindowRectangle(0, 0, width, height ); } else { - OSG_NOTIFY(osg::NOTICE)<<" GraphicsWindow has not been created successfully."< gc = osg::GraphicsContext::createGraphicsContext(traits.get()); if (!gc) { - OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindow has not been created successfully."< gc = osg::GraphicsContext::createGraphicsContext(traits.get()); if (!gc) { - OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindow has not been created successfully."< gc = osg::GraphicsContext::createGraphicsContext(traits.get()); if (!gc) { - OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindow has not been created successfully."<getSceneData() : 0; @@ -1645,7 +1645,7 @@ void View::requestRedraw() } else { - OSG_NOTIFY(osg::INFO)<<"View::requestRedraw(), No viewer base has been assigned yet."<getAllowEventFocus() && slave._camera->getRenderTargetImplementation()==osg::Camera::FRAME_BUFFER) { - OSG_NOTIFY(osg::INFO)<<"Testing slave camera "<getName()<getName()<getViewport() : 0; @@ -1765,15 +1765,15 @@ const osg::Camera* View::getCameraContainingPosition(float x, float y, float& lo osg::Vec3d new_coord = osg::Vec3d(x,y,0.0) * matrix; - //OSG_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) ) { - // OSG_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 - OSG_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) { - OSG_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); - OSG_NOTIFY(osg::NOTICE)<<"Using Dummy "<containsIntersections()) diff --git a/src/osgViewer/Viewer.cpp b/src/osgViewer/Viewer.cpp index 10f71ddce..fd7f499cc 100644 --- a/src/osgViewer/Viewer.cpp +++ b/src/osgViewer/Viewer.cpp @@ -100,7 +100,7 @@ Viewer::Viewer(osg::ArgumentParser& arguments) } else { - OSG_NOTIFY(osg::WARN)<<"Invalid clear color \""< object = osgDB::readObjectFile(filename); if (!object) { - //OSG_NOTIFY(osg::NOTICE)<<"Error: Unable to load configuration file \""<(object.get()); if (compositeViewer) { - OSG_NOTIFY(osg::NOTICE)<<"Error: Config file \""<delta_s(_startTick, osg::Timer::instance()->tick()); - // OSG_NOTIFY(osg::NOTICE)<<"Viewer::frameEventTraversal()."<= viewport->x() && y >= viewport->y() && x <= (viewport->x()+viewport->width()) && y <= (viewport->y()+viewport->height()) ) { - // OSG_NOTIFY(osg::NOTICE)<<"setCamera with focus "<getName()<<" x="<getName()<<" x="<getEventType()) { case(osgGA::GUIEventAdapter::PUSH): - OSG_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_NOTICE<<" RESIZE "<getWindowX()<<"/"<getWindowY()<<" x "<getWindowWidth()<<"/"<getWindowHeight() << std::endl; break; case(osgGA::GUIEventAdapter::QUIT_APPLICATION): - OSG_NOTIFY(osg::NOTICE)<<" QUIT_APPLICATION " << std::endl; + OSG_NOTICE<<" QUIT_APPLICATION " << std::endl; break; case(osgGA::GUIEventAdapter::FRAME): - // OSG_NOTIFY(osg::NOTICE)<<" FRAME "<getSceneData()) { - OSG_NOTIFY(osg::INFO)<<"Making scene thread safe"<getSceneData()->setThreadSafeRefUnref(true); @@ -375,7 +375,7 @@ void ViewerBase::startThreading() if (!gc->isRealized()) { - OSG_NOTIFY(osg::INFO)<<"ViewerBase::startThreading() : Realizng window "<realize(); } @@ -450,7 +450,7 @@ void ViewerBase::startThreading() osg::Camera* camera = *camItr; if (camera->getCameraThread() && !camera->getCameraThread()->isRunning()) { - OSG_NOTIFY(osg::INFO)<<" camera->getCameraThread()-> "<getCameraThread()<getCameraThread()-> "<getCameraThread()<getCameraThread()->startThread(); } } @@ -491,7 +491,7 @@ void ViewerBase::startThreading() osg::GraphicsContext* gc = (*citr); if (gc->getGraphicsThread() && !gc->getGraphicsThread()->isRunning()) { - OSG_NOTIFY(osg::INFO)<<" gc->getGraphicsThread()->startThread() "<getGraphicsThread()<getGraphicsThread()->startThread() "<getGraphicsThread()<getGraphicsThread()->startThread(); // OpenThreads::Thread::YieldCurrentThread(); } @@ -499,7 +499,7 @@ void ViewerBase::startThreading() _threadsRunning = true; - OSG_NOTIFY(osg::INFO)<<"Set up threading"<getCamera()->getInverseViewMatrix(); - OSG_NOTIFY(osg::NOTICE)<<"View "<block(); @@ -832,12 +832,12 @@ void ViewerBase::renderingTraversals() { // osg::Timer_t startTick = osg::Timer::instance()->tick(); _endDynamicDrawBlock->block(); - // OSG_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()); - OSG_NOTIFY(osg::INFO) << "Screen resolution = " << (int)resolution.x() << "x" << (int)resolution.y() << std::endl; + 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) { - OSG_NOTIFY(osg::NOTICE) << "Error, no WindowSystemInterface available, cannot toggle window fullscreen." << std::endl; + 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()); - OSG_NOTIFY(osg::INFO) << "Screen resolution = " << (int)resolution.x() << "x" << (int)resolution.y() << std::endl; + 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); - OSG_NOTIFY(osg::NOTICE)<<"Threading model 'CullDrawThreadPerContext' selected."<setThreadingModel(osgViewer::ViewerBase::DrawThreadPerContext); - OSG_NOTIFY(osg::NOTICE)<<"Threading model 'DrawThreadPerContext' selected."<setThreadingModel(osgViewer::ViewerBase::CullThreadPerCameraDrawThreadPerContext); - OSG_NOTIFY(osg::NOTICE)<<"Threading model 'CullThreadPerCameraDrawThreadPerContext' selected."<setThreadingModel(osgViewer::ViewerBase::SingleThreaded); - OSG_NOTIFY(osg::NOTICE)<<"Threading model 'SingleThreaded' selected."<setThreadingModel(osgViewer::ViewerBase::SingleThreaded); - OSG_NOTIFY(osg::NOTICE)<<"Threading model 'SingleThreaded' selected."<setThreadingModel(viewer->suggestBestThreadingModel()); - OSG_NOTIFY(osg::NOTICE)<<"Threading model 'AutomaticSelection' selected."<setEndBarrierPosition(osgViewer::Viewer::AfterSwapBuffers); - OSG_NOTIFY(osg::NOTICE)<<"Threading model 'AfterSwapBuffers' selected."<setEndBarrierPosition(osgViewer::Viewer::BeforeSwapBuffers); - OSG_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); - OSG_NOTIFY(osg::NOTICE)<<"LODScale = "<getLODScale()<