Convert NOTIFY to OSG_NOTIFY to avoid problems with polution of users apps with the NOTIFY macro

This commit is contained in:
Robert Osfield
2010-02-10 12:44:59 +00:00
parent 6ab51c7c47
commit f17e401347
42 changed files with 884 additions and 884 deletions

View File

@@ -96,7 +96,7 @@ void CompositeViewer::constructorInit()
CompositeViewer::~CompositeViewer()
{
NOTIFY(osg::INFO)<<"CompositeViewer::~CompositeViewer()"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"CompositeViewer::~CompositeViewer()"<<std::endl;
stopThreading();
@@ -126,12 +126,12 @@ CompositeViewer::~CompositeViewer()
(*citr)->close();
}
NOTIFY(osg::INFO)<<"finished CompositeViewer::~CompositeViewer()"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"finished CompositeViewer::~CompositeViewer()"<<std::endl;
}
bool CompositeViewer::readConfiguration(const std::string& filename)
{
NOTIFY(osg::NOTICE)<<"CompositeViewer::readConfiguration("<<filename<<")"<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"CompositeViewer::readConfiguration("<<filename<<")"<<std::endl;
osg::ref_ptr<osg::Object> obj = osgDB::readObjectFile(filename);
osgViewer::View * view = dynamic_cast<osgViewer::View *>(obj.get());
if (view)
@@ -329,7 +329,7 @@ void CompositeViewer::setReferenceTime(double time)
void CompositeViewer::viewerInit()
{
NOTIFY(osg::INFO)<<"CompositeViewer::init()"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"CompositeViewer::init()"<<std::endl;
for(RefViews::iterator itr = _views.begin();
itr != _views.end();
@@ -509,13 +509,13 @@ void CompositeViewer::getOperationThreads(OperationThreads& threads, bool onlyAc
void CompositeViewer::realize()
{
//NOTIFY(osg::INFO)<<"CompositeViewer::realize()"<<std::endl;
//OSG_NOTIFY(osg::INFO)<<"CompositeViewer::realize()"<<std::endl;
setCameraWithFocus(0);
if (_views.empty())
{
NOTIFY(osg::NOTICE)<<"CompositeViewer::realize() - not views to realize."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"CompositeViewer::realize() - not views to realize."<<std::endl;
_done = true;
return;
}
@@ -525,7 +525,7 @@ void CompositeViewer::realize()
if (contexts.empty())
{
NOTIFY(osg::INFO)<<"CompositeViewer::realize() - No valid contexts found, setting up view across all screens."<<std::endl;
OSG_NOTIFY(osg::INFO)<<"CompositeViewer::realize() - No valid contexts found, setting up view across all screens."<<std::endl;
// no windows are already set up so set up a default view
_views[0]->setUpViewAcrossAllScreens();
@@ -535,7 +535,7 @@ void CompositeViewer::realize()
if (contexts.empty())
{
NOTIFY(osg::NOTICE)<<"CompositeViewer::realize() - failed to set up any windows"<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"CompositeViewer::realize() - failed to set up any windows"<<std::endl;
_done = true;
return;
}
@@ -679,7 +679,7 @@ void CompositeViewer::eventTraversal()
double beginEventTraversal = osg::Timer::instance()->delta_s(_startTick, osg::Timer::instance()->tick());
// NOTIFY(osg::NOTICE)<<"CompositeViewer::frameEventTraversal()."<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"CompositeViewer::frameEventTraversal()."<<std::endl;
// need to copy events from the GraphicsWindow's into local EventQueue;
@@ -722,7 +722,7 @@ void CompositeViewer::eventTraversal()
{
osgGA::GUIEventAdapter* event = itr->get();
//NOTIFY(osg::NOTICE)<<"event->getGraphicsContext()="<<event->getGraphicsContext()<<std::endl;
//OSG_NOTIFY(osg::NOTICE)<<"event->getGraphicsContext()="<<event->getGraphicsContext()<<std::endl;
bool pointerEvent = false;
@@ -884,7 +884,7 @@ void CompositeViewer::eventTraversal()
}
// NOTIFY(osg::NOTICE)<<"mouseEventState Xmin = "<<eventState->getXmin()<<" Ymin="<<eventState->getYmin()<<" xMax="<<eventState->getXmax()<<" Ymax="<<eventState->getYmax()<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"mouseEventState Xmin = "<<eventState->getXmin()<<" Ymin="<<eventState->getYmin()<<" xMax="<<eventState->getXmax()<<" Ymax="<<eventState->getYmax()<<std::endl;
for(RefViews::iterator vitr = _views.begin();
@@ -897,7 +897,7 @@ void CompositeViewer::eventTraversal()
}
// NOTIFY(osg::NOTICE)<<"Events "<<events.size()<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"Events "<<events.size()<<std::endl;
if ((_keyEventSetsDone!=0) || _quitEventSetsDone)
{

View File

@@ -39,7 +39,7 @@ static pascal OSStatus GraphicsWindowEventHandler(EventHandlerCallRef nextHandle
Rect bounds;
OSStatus result = eventNotHandledErr; /* report failure by default */
NOTIFY(osg::INFO) << "GraphicsWindowEventHandler" << std::endl;
OSG_NOTIFY(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)
{
NOTIFY(osg::WARN) << "GraphicsWindowCarbon::init could not create a valid pixelformat" << std::endl;
OSG_NOTIFY(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)
{
NOTIFY(osg::WARN) << "GraphicsWindowCarbon::setWindowDecoration failed with " << err << std::endl;
OSG_NOTIFY(osg::WARN) << "GraphicsWindowCarbon::setWindowDecoration failed with " << err << std::endl;
return false;
}
@@ -350,7 +350,7 @@ bool GraphicsWindowCarbon::realizeImplementation()
if (!_initialized) return false;
if (!_traits) return false;
NOTIFY(osg::INFO) << "GraphicsWindowCarbon:: realizeIMplementation" << std::endl;
OSG_NOTIFY(osg::INFO) << "GraphicsWindowCarbon:: realizeIMplementation" << std::endl;
setWindowDecoration(_traits->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."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Warning: GraphicsWindow not realized, cannot do makeCurrent."<<std::endl;
return false;
}
// NOTIFY(osg::NOTICE)<<"makeCurrentImplementation "<<this<<" "<<OpenThreads::Thread::CurrentThread()<<std::endl;
// NOTIFY(osg::NOTICE)<<" glXMakeCurrent ("<<_display<<","<<_window<<","<<_glxContext<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"makeCurrentImplementation "<<this<<" "<<OpenThreads::Thread::CurrentThread()<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<" glXMakeCurrent ("<<_display<<","<<_window<<","<<_glxContext<<std::endl;
return (aglSetCurrentContext(NULL) == GL_TRUE);
}
@@ -482,7 +482,7 @@ bool GraphicsWindowCarbon::releaseContextImplementation()
void GraphicsWindowCarbon::closeImplementation()
{
// NOTIFY(osg::INFO) << "GraphicsWindowCarbon::closeImplementation" << std::endl;
// OSG_NOTIFY(osg::INFO) << "GraphicsWindowCarbon::closeImplementation" << std::endl;
_valid = false;
_realized = false;
@@ -741,7 +741,7 @@ bool GraphicsWindowCarbon::handleKeyboardEvent(EventRef theEvent)
UInt32 rawkey;
GetEventParameter (theEvent,kEventParamKeyCode,typeUInt32, NULL,sizeof(rawkey), NULL,&rawkey);
// NOTIFY(osg::INFO) << "key code: " << rawkey << " modifiers: " << modifierKeys << std::endl;
// OSG_NOTIFY(osg::INFO) << "key code: " << rawkey << " modifiers: " << modifierKeys << std::endl;
UInt32 dataSize;
/* jbw check return status so that we don't allocate a huge array */
@@ -760,14 +760,14 @@ bool GraphicsWindowCarbon::handleKeyboardEvent(EventRef theEvent)
case kEventRawKeyRepeat:
{
//getEventQueue()->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<DarwinWindowingSystemInterface*>(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<DarwinWindowingSystemInterface*>(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;
}

View File

@@ -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<int>(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)."<<std::endl;
OSG_NOTIFY(osg::NOTICE) << "Win32WindowingSystem::getScreenSettings() is not fully implemented (cannot retreive the hardware's default refresh rate)."<<std::endl;
resolution.refreshRate = 0;
}
} else
@@ -932,7 +932,7 @@ void Win32WindowingSystem::enumerateScreenSettings(const osg::GraphicsContext::S
if (si.displayNum>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<int>(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;
}
}

View File

@@ -44,12 +44,12 @@ bool checkEGLError(const char* str)
EGLint err = eglGetError();
if (err != EGL_SUCCESS)
{
NOTIFY(osg::WARN)<<"Warning: "<<str<<" EGL error "<<std::hex<<err<<std::dec<<std::endl;
OSG_NOTIFY(osg::WARN)<<"Warning: "<<str<<" EGL error "<<std::hex<<err<<std::dec<<std::endl;
return true;
}
else
{
// NOTIFY(osg::WARN)<<"EGL reports no errors: "<<str<<std::endl;
// OSG_NOTIFY(osg::WARN)<<"EGL reports no errors: "<<str<<std::endl;
return false;
}
}
@@ -299,7 +299,7 @@ bool GraphicsWindowX11::createVisualInfo()
int depth = DefaultDepth( _display, _traits->screenNum );
if (XMatchVisualInfo( _display, _traits->screenNum, depth, TrueColor, _visualInfo )==0)
{
NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::createVisualInfo() failed."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::createVisualInfo() failed."<<std::endl;
return false;
}
@@ -371,7 +371,7 @@ bool GraphicsWindowX11::checkAndSendEventFullScreenIfNeeded(Display* display, in
{
osg::GraphicsContext::WindowingSystemInterface *wsi = osg::GraphicsContext::getWindowingSystemInterface();
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 false;
}
@@ -446,7 +446,7 @@ bool GraphicsWindowX11::setWindowDecorationImplementation(bool flag)
}
else
{
NOTIFY(osg::NOTICE)<<"Error: GraphicsWindowX11::setBorder(" << flag << ") - couldn't change decorations." << std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Error: GraphicsWindowX11::setBorder(" << flag << ") - couldn't change decorations." << std::endl;
result = false;
}
@@ -635,7 +635,7 @@ void GraphicsWindowX11::init()
if (!_display)
{
NOTIFY(osg::NOTICE)<<"Error: Unable to open display \"" << XDisplayName(_traits->displayName().c_str()) << "\"."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Error: Unable to open display \"" << XDisplayName(_traits->displayName().c_str()) << "\"."<<std::endl;
_valid = false;
return;
}
@@ -647,7 +647,7 @@ void GraphicsWindowX11::init()
EGLint eglMajorVersion, eglMinorVersion;
if (!eglInitialize(_eglDisplay, &eglMajorVersion, &eglMinorVersion))
{
NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::init() - eglInitialize() failed."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::init() - eglInitialize() failed."<<std::endl;
XCloseDisplay( _display );
_display = 0;
@@ -655,14 +655,14 @@ void GraphicsWindowX11::init()
return;
}
NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::init() - eglInitialize() succeded eglMajorVersion="<<eglMajorVersion<<" iMinorVersion="<<eglMinorVersion<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::init() - eglInitialize() succeded eglMajorVersion="<<eglMajorVersion<<" iMinorVersion="<<eglMinorVersion<<std::endl;
#else
// Query for GLX extension
int errorBase, eventBase;
if( glXQueryExtension( _display, &errorBase, &eventBase) == False )
{
NOTIFY(osg::NOTICE)<<"Error: " << XDisplayName(_traits->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="<<errorBase<<" eventBase="<<eventBase<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"GLX extension, errorBase="<<errorBase<<" eventBase="<<eventBase<<std::endl;
if (!createVisualInfo())
{
@@ -681,11 +681,11 @@ void GraphicsWindowX11::init()
_traits->alpha /= 2;
_traits->depth /= 2;
NOTIFY(osg::INFO)<<"Relaxing traits"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"Relaxing traits"<<std::endl;
if (!createVisualInfo())
{
NOTIFY(osg::NOTICE)<<"Error: Not able to create requested visual." << std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Error: Not able to create requested visual." << std::endl;
XCloseDisplay( _display );
_display = 0;
_valid = false;
@@ -708,7 +708,7 @@ void GraphicsWindowX11::init()
return;
}
NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::init() - window created ="<<_valid<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::init() - window created ="<<_valid<<std::endl;
EGLConfig eglConfig = 0;
@@ -732,7 +732,7 @@ void GraphicsWindowX11::init()
int numConfigs;
if (!eglChooseConfig(_eglDisplay, configAttribs, &eglConfig, 1, &numConfigs) || (numConfigs != 1))
{
NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::init() - eglChooseConfig() failed."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::init() - eglChooseConfig() failed."<<std::endl;
XCloseDisplay( _display );
_valid = false;
_display = 0;
@@ -744,7 +744,7 @@ void GraphicsWindowX11::init()
_eglSurface = eglCreateWindowSurface(_eglDisplay, eglConfig, (EGLNativeWindowType)_window, NULL);
if (_eglSurface == EGL_NO_SURFACE)
{
NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::init() - eglCreateWindowSurface(..) failed."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::init() - eglCreateWindowSurface(..) failed."<<std::endl;
XCloseDisplay( _display );
_valid = false;
_display = 0;
@@ -764,7 +764,7 @@ void GraphicsWindowX11::init()
_context = eglCreateContext(_eglDisplay, eglConfig, sharedContext, contextAttribs);
if (_context == EGL_NO_CONTEXT)
{
NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::init() - eglCreateContext(..) failed."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::init() - eglCreateContext(..) failed."<<std::endl;
XCloseDisplay( _display );
_valid = false;
_display = 0;
@@ -781,7 +781,7 @@ void GraphicsWindowX11::init()
if (!_context)
{
NOTIFY(osg::NOTICE)<<"Error: Unable to create OpenGL graphics context."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Error: Unable to create OpenGL graphics context."<<std::endl;
XCloseDisplay( _display );
_display = 0;
_valid = false;
@@ -828,7 +828,7 @@ bool GraphicsWindowX11::createWindow()
swatt.override_redirect = true;
mask |= CWOverrideRedirect;
NOTIFY(osg::INFO)<<"Setting override redirect"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"Setting override redirect"<<std::endl;
}
_window = XCreateWindow( _display, _parent,
@@ -840,7 +840,7 @@ bool GraphicsWindowX11::createWindow()
if (!_window)
{
NOTIFY(osg::NOTICE)<<"Error: Unable to create Window."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Error: Unable to create Window."<<std::endl;
_context = 0;
return false;
}
@@ -885,7 +885,7 @@ bool GraphicsWindowX11::createWindow()
resized( watt.x, watt.y, watt.width, watt.height );
}
//NOTIFY(osg::NOTICE)<<"After sync apply.x = "<<watt.x<<" watt.y="<<watt.y<<" width="<<watt.width<<" height="<<watt.height<<std::endl;
//OSG_NOTIFY(osg::NOTICE)<<"After sync apply.x = "<<watt.x<<" watt.y="<<watt.y<<" width="<<watt.width<<" height="<<watt.height<<std::endl;
XSelectInput( _eventDisplay, _window, ExposureMask | StructureNotifyMask |
@@ -904,20 +904,20 @@ bool GraphicsWindowX11::setWindow(Window window)
{
if (_initialized)
{
NOTIFY(osg::NOTICE) << "GraphicsWindowX11::setWindow() - Window already created; it cannot be changed";
OSG_NOTIFY(osg::NOTICE) << "GraphicsWindowX11::setWindow() - Window already created; it cannot be changed";
return false;
}
if (window==0)
{
NOTIFY(osg::NOTICE) << "GraphicsWindowX11::setWindow() - Invalid window handle passed ";
OSG_NOTIFY(osg::NOTICE) << "GraphicsWindowX11::setWindow() - Invalid window handle passed ";
return false;
}
_window = window;
if (_window==0)
{
NOTIFY(osg::NOTICE) << "GraphicsWindowX11::setWindow() - Unable to retrieve native window handle";
OSG_NOTIFY(osg::NOTICE) << "GraphicsWindowX11::setWindow() - Unable to retrieve native window handle";
return false;
}
@@ -947,7 +947,7 @@ bool GraphicsWindowX11::realizeImplementation()
{
if (_realized)
{
NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::realizeImplementation() Already realized"<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::realizeImplementation() Already realized"<<std::endl;
return true;
}
@@ -969,7 +969,7 @@ bool GraphicsWindowX11::makeCurrentImplementation()
{
if (!_realized)
{
NOTIFY(osg::NOTICE)<<"Warning: GraphicsWindow not realized, cannot do makeCurrent."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Warning: GraphicsWindow not realized, cannot do makeCurrent."<<std::endl;
return false;
}
@@ -986,7 +986,7 @@ bool GraphicsWindowX11::releaseContextImplementation()
{
if (!_realized)
{
NOTIFY(osg::NOTICE)<<"Warning: GraphicsWindow not realized, cannot do release context."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Warning: GraphicsWindow not realized, cannot do release context."<<std::endl;
return false;
}
@@ -1002,7 +1002,7 @@ bool GraphicsWindowX11::releaseContextImplementation()
void GraphicsWindowX11::closeImplementation()
{
// NOTIFY(osg::NOTICE)<<"Closing GraphicsWindowX11"<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"Closing GraphicsWindowX11"<<std::endl;
if (_eventDisplay)
{
@@ -1060,7 +1060,7 @@ void GraphicsWindowX11::swapBuffersImplementation()
{
if (!_realized) return;
// NOTIFY(osg::NOTICE)<<"swapBuffersImplementation "<<this<<" "<<OpenThreads::Thread::CurrentThread()<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"swapBuffersImplementation "<<this<<" "<<OpenThreads::Thread::CurrentThread()<<std::endl;
#ifdef OSG_USE_EGL
eglSwapBuffers( _eglDisplay, _eglSurface );
@@ -1081,7 +1081,7 @@ void GraphicsWindowX11::swapBuffersImplementation()
{
if (static_cast<Atom>(ev.xclient.data.l[0]) == _deleteWindow)
{
NOTIFY(osg::INFO)<<"DeleteWindow event received"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"DeleteWindow event received"<<std::endl;
getEventQueue()->closeWindow();
}
}
@@ -1100,7 +1100,7 @@ void GraphicsWindowX11::checkEvents()
double resizeTime = eventTime;
_timeOfLastCheckEvents = getEventQueue()->getTime();
// NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::checkEvents() : getEventQueue()->getCurrentEventState()->getGraphicsContext()="<<getEventQueue()->getCurrentEventState()->getGraphicsContext()<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::checkEvents() : getEventQueue()->getCurrentEventState()->getGraphicsContext()="<<getEventQueue()->getCurrentEventState()->getGraphicsContext()<<std::endl;
int windowX = _traits->x;
int windowY = _traits->y;
@@ -1111,7 +1111,7 @@ void GraphicsWindowX11::checkEvents()
Time firstEventTime = 0;
// NOTIFY(osg::NOTICE)<<"Check events"<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"Check events"<<std::endl;
while( XPending(display) )
{
XEvent ev;
@@ -1121,36 +1121,36 @@ void GraphicsWindowX11::checkEvents()
{
case ClientMessage:
{
NOTIFY(osg::NOTICE)<<"ClientMessage event received"<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"ClientMessage event received"<<std::endl;
if (static_cast<Atom>(ev.xclient.data.l[0]) == _deleteWindow)
{
NOTIFY(osg::NOTICE)<<"DeleteWindow event received"<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"DeleteWindow event received"<<std::endl;
// FIXME only do if _ownsWindow ?
destroyWindowRequested = true;
getEventQueue()->closeWindow(eventTime);
}
}
case Expose :
NOTIFY(osg::INFO)<<"Expose x="<<ev.xexpose.x<<" y="<<ev.xexpose.y<<" width="<<ev.xexpose.width<<", height="<<ev.xexpose.height<<std::endl;
OSG_NOTIFY(osg::INFO)<<"Expose x="<<ev.xexpose.x<<" y="<<ev.xexpose.y<<" width="<<ev.xexpose.width<<", height="<<ev.xexpose.height<<std::endl;
break;
case GravityNotify :
NOTIFY(osg::INFO)<<"GravityNotify event received"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"GravityNotify event received"<<std::endl;
break;
case ReparentNotify:
NOTIFY(osg::INFO)<<"ReparentNotify event received"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"ReparentNotify event received"<<std::endl;
break;
case DestroyNotify :
NOTIFY(osg::NOTICE)<<"DestroyNotify event received"<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"DestroyNotify event received"<<std::endl;
_realized = false;
_valid = false;
break;
case ConfigureNotify :
{
NOTIFY(osg::INFO)<<"ConfigureNotify x="<<ev.xconfigure.x<<" y="<<ev.xconfigure.y<<" width="<<ev.xconfigure.width<<", height="<<ev.xconfigure.height<<std::endl;
OSG_NOTIFY(osg::INFO)<<"ConfigureNotify x="<<ev.xconfigure.x<<" y="<<ev.xconfigure.y<<" width="<<ev.xconfigure.width<<", height="<<ev.xconfigure.height<<std::endl;
if (windowX != ev.xconfigure.x ||
windowX != ev.xconfigure.y ||
@@ -1170,13 +1170,13 @@ void GraphicsWindowX11::checkEvents()
case MapNotify :
{
NOTIFY(osg::INFO)<<"MapNotify"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"MapNotify"<<std::endl;
XWindowAttributes watt;
do
XGetWindowAttributes(display, _window, &watt );
while( watt.map_state != IsViewable );
NOTIFY(osg::INFO)<<"MapNotify x="<<watt.x<<" y="<<watt.y<<" width="<<watt.width<<", height="<<watt.height<<std::endl;
OSG_NOTIFY(osg::INFO)<<"MapNotify x="<<watt.x<<" y="<<watt.y<<" width="<<watt.width<<", height="<<watt.height<<std::endl;
if (windowWidth != watt.width || windowHeight != watt.height)
{
@@ -1190,14 +1190,14 @@ void GraphicsWindowX11::checkEvents()
}
case FocusIn :
NOTIFY(osg::INFO)<<"FocusIn event received"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"FocusIn event received"<<std::endl;
flushKeyEvents();
break;
case UnmapNotify :
case FocusOut :
{
NOTIFY(osg::INFO)<<"FocusOut/UnmapNotify event received"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"FocusOut/UnmapNotify event received"<<std::endl;
if (ev.type == FocusOut && ev.xfocus.mode != NotifyNormal) break;
char modMap[32];
@@ -1220,14 +1220,14 @@ void GraphicsWindowX11::checkEvents()
}
case EnterNotify :
NOTIFY(osg::INFO)<<"EnterNotify event received"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"EnterNotify event received"<<std::endl;
_modifierState = ev.xcrossing.state;
syncLocks();
break;
case KeymapNotify :
{
NOTIFY(osg::INFO)<<"KeymapNotify event received"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"KeymapNotify event received"<<std::endl;
// KeymapNotify is guaranteed to directly follow either a FocusIn or
// an EnterNotify event. We are only interested in the FocusIn case.
@@ -1270,7 +1270,7 @@ void GraphicsWindowX11::checkEvents()
}
case MappingNotify :
NOTIFY(osg::INFO)<<"MappingNotify event received"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"MappingNotify event received"<<std::endl;
if (ev.xmapping.request == MappingModifier) rescanModifierMapping();
break;
@@ -1330,7 +1330,7 @@ void GraphicsWindowX11::checkEvents()
transformMouseXY(mx, my);
getEventQueue()->mouseMotion(mx, my, eventTime);
// NOTIFY(osg::NOTICE)<<"MotionNotify wx="<<wx<<" wy="<<wy<<" mx="<<mx<<" my="<<my<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"MotionNotify wx="<<wx<<" wy="<<wy<<" mx="<<mx<<" my="<<my<<std::endl;
break;
}
@@ -1430,7 +1430,7 @@ void GraphicsWindowX11::checkEvents()
}
default:
NOTIFY(osg::NOTICE)<<"Other event "<<ev.type<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Other event "<<ev.type<<std::endl;
break;
}
@@ -1643,30 +1643,30 @@ typedef int (*X11ErrorHandler)(Display*, XErrorEvent*);
int X11ErrorHandling(Display* display, XErrorEvent* event)
{
NOTIFY(osg::NOTICE)<<"Got an X11ErrorHandling call display="<<display<<" event="<<event<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Got an X11ErrorHandling call display="<<display<<" event="<<event<<std::endl;
char buffer[256];
XGetErrorText( display, event->error_code, buffer, 256);
NOTIFY(osg::NOTICE) << buffer << std::endl;
NOTIFY(osg::NOTICE) << "Major opcode: " << (int)event->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)."<<std::endl;
OSG_NOTIFY(osg::NOTICE) << "X11WindowingSystemInterface::_setScreen() is not fully implemented (missing depth)."<<std::endl;
Display* display = XOpenDisplay(si.displayName().c_str());
@@ -1692,7 +1692,7 @@ class X11WindowingSystemInterface : public osg::GraphicsContext::WindowingSystem
if(!sc)
{
NOTIFY(osg::NOTICE) << "Unable to create XRRScreenConfiguration on display \"" << XDisplayName(si.displayName().c_str()) << "\"."<<std::endl;
OSG_NOTIFY(osg::NOTICE) << "Unable to create XRRScreenConfiguration on display \"" << XDisplayName(si.displayName().c_str()) << "\"."<<std::endl;
return false;
}
@@ -1734,11 +1734,11 @@ class X11WindowingSystemInterface : public osg::GraphicsContext::WindowingSystem
if(rate > 0.0f && !rateFound)
{
NOTIFY(osg::NOTICE) << "Unable to find valid refresh rate " << rate << " on display \"" << XDisplayName(si.displayName().c_str()) << "\"."<<std::endl;
OSG_NOTIFY(osg::NOTICE) << "Unable to find valid refresh rate " << rate << " on display \"" << XDisplayName(si.displayName().c_str()) << "\"."<<std::endl;
}
else if(XRRSetScreenConfigAndRate(display, sc, DefaultRootWindow(display), i, currentRot, static_cast<short>(rate), CurrentTime) != RRSetConfigSuccess)
{
NOTIFY(osg::NOTICE) << "Unable to set resolution to " << width << "x" << height << " on display \"" << XDisplayName(si.displayName().c_str()) << "\"."<<std::endl;
OSG_NOTIFY(osg::NOTICE) << "Unable to set resolution to " << width << "x" << height << " on display \"" << XDisplayName(si.displayName().c_str()) << "\"."<<std::endl;
}
else
{
@@ -1754,7 +1754,7 @@ class X11WindowingSystemInterface : public osg::GraphicsContext::WindowingSystem
}
else
{
NOTIFY(osg::NOTICE) << "Unable to open display \"" << XDisplayName(si.displayName().c_str()) << "\"."<<std::endl;
OSG_NOTIFY(osg::NOTICE) << "Unable to open display \"" << XDisplayName(si.displayName().c_str()) << "\"."<<std::endl;
return false;
}
}
@@ -1767,7 +1767,7 @@ protected:
public:
X11WindowingSystemInterface()
{
NOTIFY(osg::INFO)<<"X11WindowingSystemInterface()"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"X11WindowingSystemInterface()"<<std::endl;
// Install an X11 error handler, if the application has not already done so.
@@ -1781,13 +1781,13 @@ public:
if ( currentHandler == defHandler )
{
// No application error handler, use ours.
// NOTIFY(osg::INFO)<<"Set osgViewer X11 error handler"<<std::endl;
// OSG_NOTIFY(osg::INFO)<<"Set osgViewer X11 error handler"<<std::endl;
_errorHandlerSet = 1;
}
else
{
// Application error handler exists, leave it set.
// NOTIFY(osg::INFO)<<"Existing application X11 error handler set"<<std::endl;
// OSG_NOTIFY(osg::INFO)<<"Existing application X11 error handler set"<<std::endl;
_errorHandlerSet = 0;
XSetErrorHandler(currentHandler);
}
@@ -1795,12 +1795,12 @@ public:
#if 0
if (XInitThreads() == 0)
{
NOTIFY(osg::NOTICE) << "Error: XInitThreads() failed. Aborting." << std::endl;
OSG_NOTIFY(osg::NOTICE) << "Error: XInitThreads() failed. Aborting." << std::endl;
exit(1);
}
else
{
NOTIFY(osg::INFO) << "X11WindowingSystemInterface, xInitThreads() multi-threaded X support initialized.\n";
OSG_NOTIFY(osg::INFO) << "X11WindowingSystemInterface, xInitThreads() multi-threaded X support initialized.\n";
}
#endif
@@ -1816,7 +1816,7 @@ public:
osg::Referenced::getDeleteHandler()->flushAll();
}
//NOTIFY(osg::NOTICE)<<"~X11WindowingSystemInterface()"<<std::endl;
//OSG_NOTIFY(osg::NOTICE)<<"~X11WindowingSystemInterface()"<<std::endl;
// Unset our X11 error handler, providing the application has not replaced it.
@@ -1825,12 +1825,12 @@ public:
X11ErrorHandler currentHandler = XSetErrorHandler(NULL);
if ( currentHandler == X11ErrorHandling )
{
// NOTIFY(osg::INFO)<<"osgViewer X11 error handler removed"<<std::endl;
// OSG_NOTIFY(osg::INFO)<<"osgViewer X11 error handler removed"<<std::endl;
}
else
{
// Not our error handler, leave it set.
// NOTIFY(osg::INFO)<<"Application X11 error handler left"<<std::endl;
// OSG_NOTIFY(osg::INFO)<<"Application X11 error handler left"<<std::endl;
XSetErrorHandler(currentHandler);
}
}
@@ -1848,7 +1848,7 @@ public:
}
else
{
NOTIFY(osg::NOTICE) << "A Unable to open display \"" << XDisplayName(si.displayName().c_str()) << "\""<<std::endl;
OSG_NOTIFY(osg::NOTICE) << "A Unable to open display \"" << XDisplayName(si.displayName().c_str()) << "\""<<std::endl;
return 0;
}
}
@@ -1883,7 +1883,7 @@ public:
}
else
{
NOTIFY(osg::NOTICE) << "Unable to open display \"" << XDisplayName(si.displayName().c_str()) << "\"."<<std::endl;
OSG_NOTIFY(osg::NOTICE) << "Unable to open display \"" << XDisplayName(si.displayName().c_str()) << "\"."<<std::endl;
resolution.width = 0;
resolution.height = 0;
resolution.colorDepth = 0;
@@ -1896,7 +1896,7 @@ public:
#ifdef OSGVIEWER_USE_XRANDR
_setScreen(si, resolution.width, resolution.height, resolution.colorDepth, resolution.refreshRate);
#else
NOTIFY(osg::NOTICE) << "You must build osgViewer with Xrandr 1.2 or higher for setScreenSettings support!" << std::endl;
OSG_NOTIFY(osg::NOTICE) << "You must build osgViewer with Xrandr 1.2 or higher for setScreenSettings support!" << std::endl;
#endif
return false;
}
@@ -1919,7 +1919,7 @@ public:
{
for(int i=0; i<nsizes; ++i)
{
NOTIFY(osg::INFO)<<"Screen size "<<screenSizes[i].width<<" "<<screenSizes[i].height<<" "<<screenSizes[i].mwidth<<" "<<screenSizes[i].mheight<<std::endl;
OSG_NOTIFY(osg::INFO)<<"Screen size "<<screenSizes[i].width<<" "<<screenSizes[i].height<<" "<<screenSizes[i].mwidth<<" "<<screenSizes[i].mheight<<std::endl;
int nrates;
short * rates = XRRRates (display, si.screenNum, i, &nrates);
@@ -1927,7 +1927,7 @@ public:
{
for(int j=0; j<nrates; ++j)
{
NOTIFY(osg::INFO)<<" rates "<<rates[j]<<std::endl;
OSG_NOTIFY(osg::INFO)<<" rates "<<rates[j]<<std::endl;
resolutionList.push_back(osg::GraphicsContext::ScreenSettings(
screenSizes[i].width,
@@ -1954,7 +1954,7 @@ public:
if (resolutionList.empty())
{
NOTIFY(osg::NOTICE) << "X11WindowingSystemInterface::enumerateScreenSettings() not supported." << std::endl;
OSG_NOTIFY(osg::NOTICE) << "X11WindowingSystemInterface::enumerateScreenSettings() not supported." << std::endl;
}
}
@@ -1986,13 +1986,13 @@ struct RegisterWindowingSystemInterfaceProxy
{
RegisterWindowingSystemInterfaceProxy()
{
NOTIFY(osg::INFO)<<"RegisterWindowingSystemInterfaceProxy()"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"RegisterWindowingSystemInterfaceProxy()"<<std::endl;
osg::GraphicsContext::setWindowingSystemInterface(new X11WindowingSystemInterface);
}
~RegisterWindowingSystemInterfaceProxy()
{
NOTIFY(osg::INFO)<<"~RegisterWindowingSystemInterfaceProxy()"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"~RegisterWindowingSystemInterfaceProxy()"<<std::endl;
if (osg::Referenced::getDeleteHandler())
{

View File

@@ -432,21 +432,21 @@ void Renderer::draw()
osgViewer::View* view = dynamic_cast<osgViewer::View*>(_camera->getView());
osgDB::DatabasePager* databasePager = view ? view->getDatabasePager() : 0;
// NOTIFY(osg::NOTICE)<<"Drawing buffer "<<_currentDraw<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"Drawing buffer "<<_currentDraw<<std::endl;
if (_done)
{
NOTIFY(osg::INFO)<<"Renderer::release() causing draw to exit"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"Renderer::release() causing draw to exit"<<std::endl;
return;
}
if (_graphicsThreadDoesCull)
{
NOTIFY(osg::INFO)<<"Renderer::draw() completing early due to change in _graphicsThreadDoesCull flag."<<std::endl;
OSG_NOTIFY(osg::INFO)<<"Renderer::draw() completing early due to change in _graphicsThreadDoesCull flag."<<std::endl;
return;
}
// NOTIFY(osg::NOTICE)<<"RenderingOperation"<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"RenderingOperation"<<std::endl;
osg::Stats* stats = sceneView->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"<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"Completed in cull"<<std::endl;
state->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 = "<<osg::Timer::instance()->delta_m(startDrawTick, beforeDrawTick)<<std::endl;
// NOTIFY(osg::NOTICE)<<" time for draw = "<<osg::Timer::instance()->delta_m(beforeDrawTick, afterDrawTick)<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"Time wait for draw = "<<osg::Timer::instance()->delta_m(startDrawTick, beforeDrawTick)<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<" time for draw = "<<osg::Timer::instance()->delta_m(beforeDrawTick, afterDrawTick)<<std::endl;
if (stats && stats->collectStats("rendering"))
{
@@ -687,9 +687,9 @@ void Renderer::flushAndCompile(double currentElapsedFrameTime, osgUtil::SceneVie
double compileTime = availableTime - flushTime;
#if 0
NOTIFY(osg::NOTICE)<<"total availableTime = "<<availableTime*1000.0<<std::endl;
NOTIFY(osg::NOTICE)<<" flushTime = "<<flushTime*1000.0<<std::endl;
NOTIFY(osg::NOTICE)<<" compileTime = "<<compileTime*1000.0<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"total availableTime = "<<availableTime*1000.0<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" flushTime = "<<flushTime*1000.0<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" compileTime = "<<compileTime*1000.0<<std::endl;
#endif
if (compileThread)
@@ -705,7 +705,7 @@ void Renderer::flushAndCompile(double currentElapsedFrameTime, osgUtil::SceneVie
if (flushTime>0.0) compileTime += flushTime;
#if 0
NOTIFY(osg::NOTICE)<<" revised compileTime = "<<compileTime*1000.0<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" revised compileTime = "<<compileTime*1000.0<<std::endl;
#endif
if (databasePager && databasePager->requiresExternalCompileGLObjects(sceneView->getState()->getContextID()))
@@ -737,7 +737,7 @@ void Renderer::operator () (osg::GraphicsContext* context)
void Renderer::release()
{
NOTIFY(osg::INFO)<<"Renderer::release()"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"Renderer::release()"<<std::endl;
_done = true;
_availableQueue.release();

View File

@@ -502,7 +502,7 @@ struct ViewSceneStatsTextDrawCallback : public virtual osg::Drawable::DrawCallba
}
else
{
NOTIFY(osg::WARN)<<std::endl<<"No valid view to collect scene stats from"<<std::endl;
OSG_NOTIFY(osg::WARN)<<std::endl<<"No valid view to collect scene stats from"<<std::endl;
text->setText("");
}

View File

@@ -48,14 +48,14 @@ public:
{
if (_pathToCoordinateSystemNode.empty())
{
NOTIFY(osg::INFO)<<"Found CoordianteSystemNode node"<<std::endl;
NOTIFY(osg::INFO)<<" CoordinateSystem = "<<node.getCoordinateSystem()<<std::endl;
OSG_NOTIFY(osg::INFO)<<"Found CoordianteSystemNode node"<<std::endl;
OSG_NOTIFY(osg::INFO)<<" CoordinateSystem = "<<node.getCoordinateSystem()<<std::endl;
_pathToCoordinateSystemNode = getNodePath();
}
else
{
NOTIFY(osg::INFO)<<"Found additional CoordianteSystemNode node, but ignoring"<<std::endl;
NOTIFY(osg::INFO)<<" CoordinateSystem = "<<node.getCoordinateSystem()<<std::endl;
OSG_NOTIFY(osg::INFO)<<"Found additional CoordianteSystemNode node, but ignoring"<<std::endl;
OSG_NOTIFY(osg::INFO)<<" CoordinateSystem = "<<node.getCoordinateSystem()<<std::endl;
}
traverse(node);
}
@@ -74,7 +74,7 @@ public:
virtual osg::CoordinateFrame getCoordinateFrame(const osg::Vec3d& position) const
{
NOTIFY(osg::INFO)<<"getCoordinateFrame("<<position<<")"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"getCoordinateFrame("<<position<<")"<<std::endl;
osg::NodePath tmpPath = _view->getCoordinateSystemNodePath();
@@ -105,19 +105,19 @@ public:
// reapply the position.
coordinateFrame.setTrans(pos);
NOTIFY(osg::INFO)<<"csn->computeLocalCoordinateFrame(position)* osg::computeLocalToWorld(tmpPath)"<<coordinateFrame<<std::endl;
OSG_NOTIFY(osg::INFO)<<"csn->computeLocalCoordinateFrame(position)* osg::computeLocalToWorld(tmpPath)"<<coordinateFrame<<std::endl;
}
else
{
NOTIFY(osg::INFO)<<"osg::computeLocalToWorld(tmpPath)"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"osg::computeLocalToWorld(tmpPath)"<<std::endl;
coordinateFrame = osg::computeLocalToWorld(tmpPath);
}
return coordinateFrame;
}
else
{
NOTIFY(osg::INFO)<<" no coordinate system found, using default orientation"<<std::endl;
OSG_NOTIFY(osg::INFO)<<" no coordinate system found, using default orientation"<<std::endl;
return osg::Matrixd::translate(position);
}
}
@@ -133,7 +133,7 @@ View::View():
_fusionDistanceMode(osgUtil::SceneView::PROPORTIONAL_TO_SCREEN_DISTANCE),
_fusionDistanceValue(1.0f)
{
// NOTIFY(osg::NOTICE)<<"Constructing osgViewer::View"<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"Constructing osgViewer::View"<<std::endl;
_startTick = 0;
@@ -174,7 +174,7 @@ View::View(const osgViewer::View& view, const osg::CopyOp& copyop):
View::~View()
{
NOTIFY(osg::INFO)<<"Destructing osgViewer::View"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"Destructing osgViewer::View"<<std::endl;
}
void View::take(osg::View& rhs)
@@ -234,7 +234,7 @@ osg::GraphicsOperation* View::createRenderer(osg::Camera* camera)
void View::init()
{
NOTIFY(osg::INFO)<<"View::init()"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"View::init()"<<std::endl;
osg::ref_ptr<osgGA::GUIEventAdapter> 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 "<<scene.get()<<std::endl;
OSG_NOTIFY(osg::INFO)<<"View::setSceneData() Sharing scene "<<scene.get()<<std::endl;
_scene = scene;
}
else
@@ -267,11 +267,11 @@ void View::setSceneData(osg::Node* node)
{
// we are not the only reference to the Scene so we cannot reuse it.
_scene = new Scene;
NOTIFY(osg::INFO)<<"View::setSceneData() Allocating new scene"<<_scene.get()<<std::endl;
OSG_NOTIFY(osg::INFO)<<"View::setSceneData() Allocating new scene"<<_scene.get()<<std::endl;
}
else
{
NOTIFY(osg::INFO)<<"View::setSceneData() Reusing exisitng scene"<<_scene.get()<<std::endl;
OSG_NOTIFY(osg::INFO)<<"View::setSceneData() Reusing exisitng scene"<<_scene.get()<<std::endl;
}
_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."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"View::setUpViewAcrossAllScreens() : Error, no WindowSystemInterface available, cannot create windows."<<std::endl;
return;
}
@@ -473,12 +473,12 @@ void View::setUpViewAcrossAllScreens()
osgViewer::GraphicsWindow* gw = dynamic_cast<osgViewer::GraphicsWindow*>(gc.get());
if (gw)
{
NOTIFY(osg::INFO)<<" GraphicsWindow has been created successfully."<<std::endl;
OSG_NOTIFY(osg::INFO)<<" GraphicsWindow has been created successfully."<<std::endl;
gw->getEventQueue()->getCurrentEventState()->setWindowRectangle(0, 0, width, height );
}
else
{
NOTIFY(osg::NOTICE)<<" GraphicsWindow has not been created successfully."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" GraphicsWindow has not been created successfully."<<std::endl;
}
double newAspectRatio = double(traits->width) / double(traits->height);
@@ -542,13 +542,13 @@ void View::setUpViewAcrossAllScreens()
osgViewer::GraphicsWindow* gw = dynamic_cast<osgViewer::GraphicsWindow*>(gc.get());
if (gw)
{
NOTIFY(osg::INFO)<<" GraphicsWindow has been created successfully."<<gw<<std::endl;
OSG_NOTIFY(osg::INFO)<<" GraphicsWindow has been created successfully."<<gw<<std::endl;
gw->getEventQueue()->getCurrentEventState()->setWindowRectangle(traits->x, traits->y, traits->width, traits->height );
}
else
{
NOTIFY(osg::NOTICE)<<" GraphicsWindow has not been created successfully."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" GraphicsWindow has not been created successfully."<<std::endl;
}
camera->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<osgViewer::GraphicsWindow*>(gc.get());
if (gw)
{
NOTIFY(osg::INFO)<<"View::setUpViewOnSingleScreen - GraphicsWindow has been created successfully."<<std::endl;
OSG_NOTIFY(osg::INFO)<<"View::setUpViewOnSingleScreen - GraphicsWindow has been created successfully."<<std::endl;
gw->getEventQueue()->getCurrentEventState()->setWindowRectangle(x, y, width, height );
}
else
{
NOTIFY(osg::NOTICE)<<" GraphicsWindow has not been created successfully."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" GraphicsWindow has not been created successfully."<<std::endl;
}
double fovy, aspectRatio, zNear, zFar;
@@ -637,7 +637,7 @@ void View::setUpViewOnSingleScreen(unsigned int screenNum)
osg::GraphicsContext::WindowingSystemInterface* wsi = osg::GraphicsContext::getWindowingSystemInterface();
if (!wsi)
{
NOTIFY(osg::NOTICE)<<"View::setUpViewOnSingleScreen() : Error, no WindowSystemInterface available, cannot create windows."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"View::setUpViewOnSingleScreen() : Error, no WindowSystemInterface available, cannot create windows."<<std::endl;
return;
}
@@ -673,12 +673,12 @@ void View::setUpViewOnSingleScreen(unsigned int screenNum)
osgViewer::GraphicsWindow* gw = dynamic_cast<osgViewer::GraphicsWindow*>(gc.get());
if (gw)
{
NOTIFY(osg::INFO)<<"View::setUpViewOnSingleScreen - GraphicsWindow has been created successfully."<<std::endl;
OSG_NOTIFY(osg::INFO)<<"View::setUpViewOnSingleScreen - GraphicsWindow has been created successfully."<<std::endl;
gw->getEventQueue()->getCurrentEventState()->setWindowRectangle(0, 0, width, height );
}
else
{
NOTIFY(osg::NOTICE)<<" GraphicsWindow has not been created successfully."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" GraphicsWindow has not been created successfully."<<std::endl;
}
double fovy, aspectRatio, zNear, zFar;
@@ -710,8 +710,8 @@ static osg::Geometry* create3DSphericalDisplayDistortionMesh(const osg::Vec3& or
osg::Vec3d projector = eye - osg::Vec3d(0.0,0.0, distance);
NOTIFY(osg::INFO)<<"create3DSphericalDisplayDistortionMesh : Projector position = "<<projector<<std::endl;
NOTIFY(osg::INFO)<<"create3DSphericalDisplayDistortionMesh : distance = "<<distance<<std::endl;
OSG_NOTIFY(osg::INFO)<<"create3DSphericalDisplayDistortionMesh : Projector position = "<<projector<<std::endl;
OSG_NOTIFY(osg::INFO)<<"create3DSphericalDisplayDistortionMesh : distance = "<<distance<<std::endl;
// create the quad to visualize.
@@ -760,7 +760,7 @@ static osg::Geometry* create3DSphericalDisplayDistortionMesh(const osg::Vec3& or
if (theta<0.0) theta += 2.0*osg::PI;
// NOTIFY(osg::NOTICE)<<"theta = "<<theta<< "phi="<<phi<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"theta = "<<theta<< "phi="<<phi<<std::endl;
osg::Vec3 texcoord(sin(phi) * cos(theta),
sin(phi) * sin(theta),
@@ -782,7 +782,7 @@ static osg::Geometry* create3DSphericalDisplayDistortionMesh(const osg::Vec3& or
cursor += dx;
}
// NOTIFY(osg::NOTICE)<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<std::endl;
}
}
else
@@ -798,7 +798,7 @@ static osg::Geometry* create3DSphericalDisplayDistortionMesh(const osg::Vec3& or
if (phi > osg::PI_2) phi = osg::PI_2;
if (theta<0.0) theta += 2.0*osg::PI;
// NOTIFY(osg::NOTICE)<<"theta = "<<theta<< "phi="<<phi<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"theta = "<<theta<< "phi="<<phi<<std::endl;
double f = distance * sin(phi);
double e = distance * cos(phi) + sqrt( sphere_radius*sphere_radius - f*f);
@@ -826,7 +826,7 @@ static osg::Geometry* create3DSphericalDisplayDistortionMesh(const osg::Vec3& or
cursor += dx;
}
// NOTIFY(osg::NOTICE)<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<std::endl;
}
}
@@ -855,11 +855,11 @@ static osg::Geometry* create3DSphericalDisplayDistortionMesh(const osg::Vec3& or
void View::setUpViewFor3DSphericalDisplay(double radius, double collar, unsigned int screenNum, osg::Image* intensityMap, const osg::Matrixd& projectorMatrix)
{
NOTIFY(osg::INFO)<<"View::setUpViewFor3DSphericalDisplay(rad="<<radius<<", cllr="<<collar<<", sn="<<screenNum<<", im="<<intensityMap<<")"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"View::setUpViewFor3DSphericalDisplay(rad="<<radius<<", cllr="<<collar<<", sn="<<screenNum<<", im="<<intensityMap<<")"<<std::endl;
osg::GraphicsContext::WindowingSystemInterface* wsi = osg::GraphicsContext::getWindowingSystemInterface();
if (!wsi)
{
NOTIFY(osg::NOTICE)<<"Error, no WindowSystemInterface available, cannot create windows."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Error, no WindowSystemInterface available, cannot create windows."<<std::endl;
return;
}
@@ -891,7 +891,7 @@ void View::setUpViewFor3DSphericalDisplay(double radius, double collar, unsigned
osg::ref_ptr<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());
if (!gc)
{
NOTIFY(osg::NOTICE)<<"GraphicsWindow has not been created successfully."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindow has not been created successfully."<<std::endl;
return;
}
@@ -1099,8 +1099,8 @@ static osg::Geometry* createParoramicSphericalDisplayDistortionMesh(const osg::V
osg::Vec3d projector = eye - osg::Vec3d(0.0,0.0, distance);
NOTIFY(osg::INFO)<<"createParoramicSphericalDisplayDistortionMesh : Projector position = "<<projector<<std::endl;
NOTIFY(osg::INFO)<<"createParoramicSphericalDisplayDistortionMesh : distance = "<<distance<<std::endl;
OSG_NOTIFY(osg::INFO)<<"createParoramicSphericalDisplayDistortionMesh : Projector position = "<<projector<<std::endl;
OSG_NOTIFY(osg::INFO)<<"createParoramicSphericalDisplayDistortionMesh : distance = "<<distance<<std::endl;
// create the quad to visualize.
osg::Geometry* geometry = new osg::Geometry();
@@ -1228,12 +1228,12 @@ static osg::Geometry* createParoramicSphericalDisplayDistortionMesh(const osg::V
void View::setUpViewForPanoramicSphericalDisplay(double radius, double collar, unsigned int screenNum, osg::Image* intensityMap, const osg::Matrixd& projectorMatrix)
{
NOTIFY(osg::INFO)<<"View::setUpViewForPanoramicSphericalDisplay(rad="<<radius<<", cllr="<<collar<<", sn="<<screenNum<<", im="<<intensityMap<<")"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"View::setUpViewForPanoramicSphericalDisplay(rad="<<radius<<", cllr="<<collar<<", sn="<<screenNum<<", im="<<intensityMap<<")"<<std::endl;
osg::GraphicsContext::WindowingSystemInterface* wsi = osg::GraphicsContext::getWindowingSystemInterface();
if (!wsi)
{
NOTIFY(osg::NOTICE)<<"Error, no WindowSystemInterface available, cannot create windows."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Error, no WindowSystemInterface available, cannot create windows."<<std::endl;
return;
}
@@ -1266,7 +1266,7 @@ void View::setUpViewForPanoramicSphericalDisplay(double radius, double collar, u
osg::ref_ptr<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());
if (!gc)
{
NOTIFY(osg::NOTICE)<<"GraphicsWindow has not been created successfully."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindow has not been created successfully."<<std::endl;
return;
}
@@ -1358,12 +1358,12 @@ void View::setUpViewForPanoramicSphericalDisplay(double radius, double collar, u
void View::setUpViewForWoWVxDisplay(unsigned int screenNum, unsigned char wow_content, unsigned char wow_factor, unsigned char wow_offset, float wow_disparity_Zd, float wow_disparity_vz, float wow_disparity_M, float wow_disparity_C)
{
NOTIFY(osg::INFO)<<"View::setUpViewForWoWVxDisplay(...)"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"View::setUpViewForWoWVxDisplay(...)"<<std::endl;
osg::GraphicsContext::WindowingSystemInterface* wsi = osg::GraphicsContext::getWindowingSystemInterface();
if (!wsi)
{
NOTIFY(osg::NOTICE)<<"Error, no WindowSystemInterface available, cannot create windows."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Error, no WindowSystemInterface available, cannot create windows."<<std::endl;
return;
}
@@ -1394,7 +1394,7 @@ void View::setUpViewForWoWVxDisplay(unsigned int screenNum, unsigned char wow_co
osg::ref_ptr<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());
if (!gc)
{
NOTIFY(osg::NOTICE)<<"GraphicsWindow has not been created successfully."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindow has not been created successfully."<<std::endl;
return;
}
@@ -1608,7 +1608,7 @@ void View::setUpViewForWoWVxDisplay(unsigned int screenNum, unsigned char wow_co
void View::assignSceneDataToCameras()
{
// NOTIFY(osg::NOTICE)<<"View::assignSceneDataToCameras()"<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"View::assignSceneDataToCameras()"<<std::endl;
osg::Node* sceneData = _scene.valid() ? _scene->getSceneData() : 0;
@@ -1653,7 +1653,7 @@ void View::requestRedraw()
}
else
{
NOTIFY(osg::INFO)<<"View::requestRedraw(), No viewer base has been assigned yet."<<std::endl;
OSG_NOTIFY(osg::INFO)<<"View::requestRedraw(), No viewer base has been assigned yet."<<std::endl;
}
}
@@ -1665,13 +1665,13 @@ void View::requestContinuousUpdate(bool flag)
}
else
{
NOTIFY(osg::INFO)<<"View::requestContinuousUpdate(), No viewer base has been assigned yet."<<std::endl;
OSG_NOTIFY(osg::INFO)<<"View::requestContinuousUpdate(), No viewer base has been assigned yet."<<std::endl;
}
}
void View::requestWarpPointer(float x,float y)
{
NOTIFY(osg::INFO)<<"View::requestWarpPointer("<<x<<","<<y<<")"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"View::requestWarpPointer("<<x<<","<<y<<")"<<std::endl;
float local_x, local_y;
const osg::Camera* camera = getCameraContainingPosition(x, y, local_x, local_y);
@@ -1691,7 +1691,7 @@ void View::requestWarpPointer(float x,float y)
}
else
{
NOTIFY(osg::INFO)<<"View::requestWarpPointer failed no camera containing pointer"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"View::requestWarpPointer failed no camera containing pointer"<<std::endl;
}
}
@@ -1740,7 +1740,7 @@ const osg::Camera* View::getCameraContainingPosition(float x, float y, float& lo
local_x = new_x;
local_y = new_y;
NOTIFY(osg::INFO)<<"Returning master camera"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"Returning master camera"<<std::endl;
return _camera.get();
}
@@ -1761,7 +1761,7 @@ const osg::Camera* View::getCameraContainingPosition(float x, float y, float& lo
slave._camera->getAllowEventFocus() &&
slave._camera->getRenderTargetImplementation()==osg::Camera::FRAME_BUFFER)
{
NOTIFY(osg::INFO)<<"Testing slave camera "<<slave._camera->getName()<<std::endl;
OSG_NOTIFY(osg::INFO)<<"Testing slave camera "<<slave._camera->getName()<<std::endl;
const osg::Camera* camera = slave._camera.get();
const osg::Viewport* viewport = camera ? camera->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="<<x<<" y="<<y<<std::endl;;
//NOTIFY(osg::NOTICE)<<" eventState->getXmin()="<<eventState->getXmin()<<" eventState->getXmax()="<<eventState->getXmax()<<std::endl;;
//NOTIFY(osg::NOTICE)<<" new_coord "<<new_coord<<std::endl;;
//OSG_NOTIFY(osg::NOTICE)<<" x="<<x<<" y="<<y<<std::endl;;
//OSG_NOTIFY(osg::NOTICE)<<" eventState->getXmin()="<<eventState->getXmin()<<" eventState->getXmax()="<<eventState->getXmax()<<std::endl;;
//OSG_NOTIFY(osg::NOTICE)<<" new_coord "<<new_coord<<std::endl;;
if (viewport &&
new_coord.x() >= (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 "<<std::endl;;
// OSG_NOTIFY(osg::NOTICE)<<" in viewport "<<std::endl;;
local_x = new_coord.x();
local_y = new_coord.y();
@@ -1790,7 +1790,7 @@ const osg::Camera* View::getCameraContainingPosition(float x, float y, float& lo
}
else
{
// NOTIFY(osg::NOTICE)<<" not in viewport "<<viewport->x()<<" "<<(viewport->x()+viewport->width())<<std::endl;;
// OSG_NOTIFY(osg::NOTICE)<<" not in viewport "<<viewport->x()<<" "<<(viewport->x()+viewport->width())<<std::endl;;
}
}
@@ -1815,13 +1815,13 @@ bool View::computeIntersections(float x,float y, osgUtil::LineSegmentIntersector
osg::ref_ptr< osgUtil::LineSegmentIntersector > picker = new osgUtil::LineSegmentIntersector(cf, local_x, local_y);
#if 0
NOTIFY(osg::NOTICE)<<"View::computeIntersections(x="<<x<<", y="<<y<<", local_x="<<local_x<<", local_y="<<local_y<<") "<<cf<<std::endl;
NOTIFY(osg::NOTICE)<<" viewport ("<<camera->getViewport()->x()<<","<<camera->getViewport()->y()<<","<<camera->getViewport()->width()<<","<<camera->getViewport()->height()<<")"<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"View::computeIntersections(x="<<x<<", y="<<y<<", local_x="<<local_x<<", local_y="<<local_y<<") "<<cf<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" viewport ("<<camera->getViewport()->x()<<","<<camera->getViewport()->y()<<","<<camera->getViewport()->width()<<","<<camera->getViewport()->height()<<")"<<std::endl;
const osg::GraphicsContext::Traits* traits = camera->getGraphicsContext() ? camera->getGraphicsContext()->getTraits() : 0;
if (traits)
{
NOTIFY(osg::NOTICE)<<" window ("<<traits->x<<","<<traits->y<<","<<traits->width<<","<<traits->height<<")"<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" window ("<<traits->x<<","<<traits->y<<","<<traits->width<<","<<traits->height<<")"<<std::endl;
}
#endif
@@ -1864,16 +1864,16 @@ bool View::computeIntersections(float x,float y, osgUtil::LineSegmentIntersector
double timeKdTree = osg::Timer::instance()->delta_m(after_dummy, after_kdTree_2);
double timeConventional = osg::Timer::instance()->delta_m(after_kdTree_2, after);
NOTIFY(osg::NOTICE)<<"Using Dummy "<<timeDummy<<std::endl;
NOTIFY(osg::NOTICE)<<" KdTrees "<<timeKdTree
OSG_NOTIFY(osg::NOTICE)<<"Using Dummy "<<timeDummy<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" KdTrees "<<timeKdTree
<<"\tNum intersects = "<<intersectsBeforeConventional-intersectsBeforeKdTree<<std::endl;
NOTIFY(osg::NOTICE)<<" KdTrees - Traversal "<<timeKdTree-timeDummy<<std::endl;
NOTIFY(osg::NOTICE)<<" Conventional "<<timeConventional
OSG_NOTIFY(osg::NOTICE)<<" KdTrees - Traversal "<<timeKdTree-timeDummy<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" Conventional "<<timeConventional
<<"\tNum intersects = "<<intersectsAfterConventional-intersectsBeforeConventional<<std::endl;
NOTIFY(osg::NOTICE)<<" Conventional - Traversal "<<timeConventional-timeDummy<<std::endl;
NOTIFY(osg::NOTICE)<<" Delta "<<timeConventional/timeKdTree<<std::endl;
NOTIFY(osg::NOTICE)<<" Delta sans Traversal "<<(timeConventional-timeDummy)/(timeKdTree-timeDummy)<<std::endl;
NOTIFY(osg::NOTICE)<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" Conventional - Traversal "<<timeConventional-timeDummy<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" Delta "<<timeConventional/timeKdTree<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" Delta sans Traversal "<<(timeConventional-timeDummy)/(timeKdTree-timeDummy)<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<std::endl;
#endif
if (picker->containsIntersections())

View File

@@ -100,7 +100,7 @@ Viewer::Viewer(osg::ArgumentParser& arguments)
}
else
{
NOTIFY(osg::WARN)<<"Invalid clear color \""<<colorStr<<"\""<<std::endl;
OSG_NOTIFY(osg::WARN)<<"Invalid clear color \""<<colorStr<<"\""<<std::endl;
}
}
@@ -209,13 +209,13 @@ void Viewer::constructorInit()
Viewer::~Viewer()
{
//NOTIFY(osg::NOTICE)<<"Viewer::~Viewer()"<<std::endl;
//OSG_NOTIFY(osg::NOTICE)<<"Viewer::~Viewer()"<<std::endl;
Threads threads;
getAllThreads(threads);
NOTIFY(osg::INFO)<<"Viewer::~Viewer():: start destructor getThreads = "<<threads.size()<<std::endl;
OSG_NOTIFY(osg::INFO)<<"Viewer::~Viewer():: start destructor getThreads = "<<threads.size()<<std::endl;
stopThreading();
@@ -237,11 +237,11 @@ Viewer::~Viewer()
(*citr)->close();
}
//NOTIFY(osg::NOTICE)<<"finish Viewer::~Viewer()"<<std::endl;
//OSG_NOTIFY(osg::NOTICE)<<"finish Viewer::~Viewer()"<<std::endl;
getAllThreads(threads);
NOTIFY(osg::INFO)<<"Viewer::~Viewer() end destrcutor getThreads = "<<threads.size()<<std::endl;
OSG_NOTIFY(osg::INFO)<<"Viewer::~Viewer() end destrcutor getThreads = "<<threads.size()<<std::endl;
}
@@ -288,19 +288,19 @@ void Viewer::take(View& rhs)
bool Viewer::readConfiguration(const std::string& filename)
{
NOTIFY(osg::INFO)<<"Viewer::readConfiguration("<<filename<<")"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"Viewer::readConfiguration("<<filename<<")"<<std::endl;
osg::ref_ptr<osg::Object> object = osgDB::readObjectFile(filename);
if (!object)
{
//NOTIFY(osg::NOTICE)<<"Error: Unable to load configuration file \""<<filename<<"\""<<std::endl;
//OSG_NOTIFY(osg::NOTICE)<<"Error: Unable to load configuration file \""<<filename<<"\""<<std::endl;
return false;
}
CompositeViewer* compositeViewer = dynamic_cast<CompositeViewer*>(object.get());
if (compositeViewer)
{
NOTIFY(osg::NOTICE)<<"Error: Config file \""<<filename<<"\" containing CompositeViewer cannot be loaded by Viewer."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Error: Config file \""<<filename<<"\" containing CompositeViewer cannot be loaded by Viewer."<<std::endl;
return false;
}
@@ -313,7 +313,7 @@ bool Viewer::readConfiguration(const std::string& filename)
}
else
{
NOTIFY(osg::NOTICE)<<"Error: Config file \""<<filename<<"\" does not contain a valid Viewer configuration."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Error: Config file \""<<filename<<"\" does not contain a valid Viewer configuration."<<std::endl;
return false;
}
}
@@ -424,7 +424,7 @@ GraphicsWindowEmbedded* Viewer::setUpViewerAsEmbeddedInWindow(int x, int y, int
void Viewer::realize()
{
//NOTIFY(osg::INFO)<<"Viewer::realize()"<<std::endl;
//OSG_NOTIFY(osg::INFO)<<"Viewer::realize()"<<std::endl;
setCameraWithFocus(0);
@@ -433,7 +433,7 @@ void Viewer::realize()
if (contexts.empty())
{
NOTIFY(osg::INFO)<<"Viewer::realize() - No valid contexts found, setting up view across all screens."<<std::endl;
OSG_NOTIFY(osg::INFO)<<"Viewer::realize() - No valid contexts found, setting up view across all screens."<<std::endl;
// no windows are already set up so set up a default view
@@ -478,7 +478,7 @@ void Viewer::realize()
if (contexts.empty())
{
NOTIFY(osg::NOTICE)<<"Viewer::realize() - failed to set up any windows"<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Viewer::realize() - failed to set up any windows"<<std::endl;
_done = true;
return;
}
@@ -608,7 +608,7 @@ void Viewer::eventTraversal()
double beginEventTraversal = osg::Timer::instance()->delta_s(_startTick, osg::Timer::instance()->tick());
// NOTIFY(osg::NOTICE)<<"Viewer::frameEventTraversal()."<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"Viewer::frameEventTraversal()."<<std::endl;
// need to copy events from the GraphicsWindow's into local EventQueue;
osgGA::EventQueue::Events events;
@@ -684,7 +684,7 @@ void Viewer::eventTraversal()
x >= viewport->x() && y >= viewport->y() &&
x <= (viewport->x()+viewport->width()) && y <= (viewport->y()+viewport->height()) )
{
// NOTIFY(osg::NOTICE)<<"setCamera with focus "<<camera->getName()<<" x="<<x<<" y="<<y<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"setCamera with focus "<<camera->getName()<<" x="<<x<<" y="<<y<<std::endl;
setCameraWithFocus(camera);
}
}
@@ -712,7 +712,7 @@ void Viewer::eventTraversal()
x = new_coord.x();
y = new_coord.y();
// NOTIFY(osg::NOTICE)<<"pointer event new_coord.x()="<<new_coord.x()<<" new_coord.y()="<<new_coord.y()<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"pointer event new_coord.x()="<<new_coord.x()<<" new_coord.y()="<<new_coord.y()<<std::endl;
event->setInputRange(eventState->getXmin(), eventState->getYmin(), eventState->getXmax(), eventState->getYmax());
event->setX(x);
@@ -724,7 +724,7 @@ void Viewer::eventTraversal()
{
x = eventState->getXmin() + (x/double(gw->getTraits()->width))*(eventState->getXmax() - eventState->getXmin());
y = eventState->getYmin() + (y/double(gw->getTraits()->height))*(eventState->getYmax() - eventState->getYmin());
// NOTIFY(osg::NOTICE)<<"new x = "<<x<<" new y = "<<y<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"new x = "<<x<<" new y = "<<y<<std::endl;
event->setInputRange(eventState->getXmin(), eventState->getYmin(), eventState->getXmax(), eventState->getYmax());
event->setX(x);
@@ -747,8 +747,8 @@ void Viewer::eventTraversal()
event->setButtonMask(eventState->getButtonMask());
event->setMouseYOrientation(eventState->getMouseYOrientation());
}
//NOTIFY(osg::NOTICE)<<" mouse x = "<<event->getX()<<" y="<<event->getY()<<std::endl;
// NOTIFY(osg::NOTICE)<<" mouse Xmin = "<<event->getXmin()<<" Ymin="<<event->getYmin()<<" xMax="<<event->getXmax()<<" Ymax="<<event->getYmax()<<std::endl;
//OSG_NOTIFY(osg::NOTICE)<<" mouse x = "<<event->getX()<<" y="<<event->getY()<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<" mouse Xmin = "<<event->getXmin()<<" Ymin="<<event->getYmin()<<" xMax="<<event->getXmax()<<" Ymax="<<event->getYmax()<<std::endl;
}
for(itr = gw_events.begin();
@@ -781,7 +781,7 @@ void Viewer::eventTraversal()
}
// NOTIFY(osg::NOTICE)<<"mouseEventState Xmin = "<<eventState->getXmin()<<" Ymin="<<eventState->getYmin()<<" xMax="<<eventState->getXmax()<<" Ymax="<<eventState->getYmax()<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"mouseEventState Xmin = "<<eventState->getXmin()<<" Ymin="<<eventState->getYmin()<<" xMax="<<eventState->getXmax()<<" Ymax="<<eventState->getYmax()<<std::endl;
_eventQueue->frame( getFrameStamp()->getReferenceTime() );
@@ -789,7 +789,7 @@ void Viewer::eventTraversal()
#if 0
// NOTIFY(osg::NOTICE)<<"Events "<<events.size()<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"Events "<<events.size()<<std::endl;
for(osgGA::EventQueue::Events::iterator itr = events.begin();
itr != events.end();
++itr)
@@ -798,43 +798,43 @@ void Viewer::eventTraversal()
switch(event->getEventType())
{
case(osgGA::GUIEventAdapter::PUSH):
NOTIFY(osg::NOTICE)<<" PUSH "<<event->getButton()<<" x="<<event->getX()<<" y="<<event->getY()<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" PUSH "<<event->getButton()<<" x="<<event->getX()<<" y="<<event->getY()<<std::endl;
break;
case(osgGA::GUIEventAdapter::RELEASE):
NOTIFY(osg::NOTICE)<<" RELEASE "<<event->getButton()<<" x="<<event->getX()<<" y="<<event->getY()<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" RELEASE "<<event->getButton()<<" x="<<event->getX()<<" y="<<event->getY()<<std::endl;
break;
case(osgGA::GUIEventAdapter::DRAG):
NOTIFY(osg::NOTICE)<<" DRAG "<<event->getButtonMask()<<" x="<<event->getX()<<" y="<<event->getY()<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" DRAG "<<event->getButtonMask()<<" x="<<event->getX()<<" y="<<event->getY()<<std::endl;
break;
case(osgGA::GUIEventAdapter::MOVE):
NOTIFY(osg::NOTICE)<<" MOVE "<<event->getButtonMask()<<" x="<<event->getX()<<" y="<<event->getY()<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" MOVE "<<event->getButtonMask()<<" x="<<event->getX()<<" y="<<event->getY()<<std::endl;
break;
case(osgGA::GUIEventAdapter::SCROLL):
NOTIFY(osg::NOTICE)<<" SCROLL "<<event->getScrollingMotion()<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" SCROLL "<<event->getScrollingMotion()<<std::endl;
break;
case(osgGA::GUIEventAdapter::KEYDOWN):
NOTIFY(osg::NOTICE)<<" KEYDOWN '"<<(char)event->getKey()<<"'"<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" KEYDOWN '"<<(char)event->getKey()<<"'"<<std::endl;
break;
case(osgGA::GUIEventAdapter::KEYUP):
NOTIFY(osg::NOTICE)<<" KEYUP '"<<(char)event->getKey()<<"'"<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" KEYUP '"<<(char)event->getKey()<<"'"<<std::endl;
break;
case(osgGA::GUIEventAdapter::RESIZE):
NOTIFY(osg::NOTICE)<<" RESIZE "<<event->getWindowX()<<"/"<<event->getWindowY()<<" x "<<event->getWindowWidth()<<"/"<<event->getWindowHeight() << std::endl;
OSG_NOTIFY(osg::NOTICE)<<" RESIZE "<<event->getWindowX()<<"/"<<event->getWindowY()<<" x "<<event->getWindowWidth()<<"/"<<event->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 "<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<" FRAME "<<std::endl;
break;
default:
// NOTIFY(osg::NOTICE)<<" Event not handled"<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<" Event not handled"<<std::endl;
break;
}
}
#endif
// NOTIFY(osg::NOTICE)<<"Events "<<events.size()<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"Events "<<events.size()<<std::endl;
if ((_keyEventSetsDone!=0) || _quitEventSetsDone)
{

View File

@@ -200,7 +200,7 @@ void ViewerBase::stopThreading()
{
if (!_threadsRunning) return;
NOTIFY(osg::INFO)<<"ViewerBase::stopThreading() - stopping threading"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"ViewerBase::stopThreading() - stopping threading"<<std::endl;
Contexts contexts;
getContexts(contexts);
@@ -255,14 +255,14 @@ void ViewerBase::stopThreading()
_endRenderingDispatchBarrier = 0;
_endDynamicDrawBlock = 0;
NOTIFY(osg::INFO)<<"Viewer::stopThreading() - stopped threading."<<std::endl;
OSG_NOTIFY(osg::INFO)<<"Viewer::stopThreading() - stopped threading."<<std::endl;
}
void ViewerBase::startThreading()
{
if (_threadsRunning) return;
NOTIFY(osg::INFO)<<"Viewer::startThreading() - starting threading"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"Viewer::startThreading() - starting threading"<<std::endl;
// release any context held by the main thread.
releaseContext();
@@ -272,7 +272,7 @@ void ViewerBase::startThreading()
Contexts contexts;
getContexts(contexts);
NOTIFY(osg::INFO)<<"Viewer::startThreading() - contexts.size()="<<contexts.size()<<std::endl;
OSG_NOTIFY(osg::INFO)<<"Viewer::startThreading() - contexts.size()="<<contexts.size()<<std::endl;
Cameras cameras;
getCameras(cameras);
@@ -298,7 +298,7 @@ void ViewerBase::startThreading()
numThreadsOnEndBarrier = 1;
break;
default:
NOTIFY(osg::NOTICE)<<"Error: Threading model not selected"<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Error: Threading model not selected"<<std::endl;
return;
}
@@ -313,7 +313,7 @@ void ViewerBase::startThreading()
{
if ((*scitr)->getSceneData())
{
NOTIFY(osg::INFO)<<"Making scene thread safe"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"Making scene thread safe"<<std::endl;
// make sure that existing scene graph objects are allocated with thread safe ref/unref
(*scitr)->getSceneData()->setThreadSafeRefUnref(true);
@@ -392,7 +392,7 @@ void ViewerBase::startThreading()
if (!gc->isRealized())
{
NOTIFY(osg::INFO)<<"ViewerBase::startThreading() : Realizng window "<<gc<<std::endl;
OSG_NOTIFY(osg::INFO)<<"ViewerBase::startThreading() : Realizng window "<<gc<<std::endl;
gc->realize();
}
@@ -467,7 +467,7 @@ void ViewerBase::startThreading()
osg::Camera* camera = *camItr;
if (camera->getCameraThread() && !camera->getCameraThread()->isRunning())
{
NOTIFY(osg::INFO)<<" camera->getCameraThread()-> "<<camera->getCameraThread()<<std::endl;
OSG_NOTIFY(osg::INFO)<<" camera->getCameraThread()-> "<<camera->getCameraThread()<<std::endl;
camera->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() "<<gc->getGraphicsThread()<<std::endl;
OSG_NOTIFY(osg::INFO)<<" gc->getGraphicsThread()->startThread() "<<gc->getGraphicsThread()<<std::endl;
gc->getGraphicsThread()->startThread();
// OpenThreads::Thread::YieldCurrentThread();
}
@@ -516,7 +516,7 @@ void ViewerBase::startThreading()
_threadsRunning = true;
NOTIFY(osg::INFO)<<"Set up threading"<<std::endl;
OSG_NOTIFY(osg::INFO)<<"Set up threading"<<std::endl;
}
void ViewerBase::getWindows(Windows& windows, bool onlyValid)
@@ -540,7 +540,7 @@ void ViewerBase::checkWindowStatus()
Contexts contexts;
getContexts(contexts);
// NOTIFY(osg::NOTICE)<<"Viewer::checkWindowStatus() - "<<contexts.size()<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"Viewer::checkWindowStatus() - "<<contexts.size()<<std::endl;
if (contexts.size()==0)
{
@@ -619,7 +619,7 @@ void ViewerBase::frame(double simulationTime)
{
if (_done) return;
// NOTIFY(osg::NOTICE)<<std::endl<<"CompositeViewer::frame()"<<std::endl<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<std::endl<<"CompositeViewer::frame()"<<std::endl<<std::endl;
if (_firstFrame)
{
@@ -656,7 +656,7 @@ void ViewerBase::renderingTraversals()
if (view)
{
const osg::Matrixd& m = view->getCamera()->getInverseViewMatrix();
NOTIFY(osg::NOTICE)<<"View "<<view<<", Master Camera position("<<m.getTrans()<<"), rotation("<<m.getRotate()<<")"<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"View "<<view<<", Master Camera position("<<m.getTrans()<<"), rotation("<<m.getRotate()<<")"<<std::endl;
}
}
}
@@ -753,7 +753,7 @@ void ViewerBase::renderingTraversals()
}
}
// NOTIFY(osg::NOTICE)<<std::endl<<"Start frame"<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<std::endl<<"Start frame"<<std::endl;
Contexts contexts;
@@ -803,7 +803,7 @@ void ViewerBase::renderingTraversals()
}
}
// NOTIFY(osg::NOTICE)<<"Joing _endRenderingDispatchBarrier block "<<_endRenderingDispatchBarrier.get()<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<"Joing _endRenderingDispatchBarrier block "<<_endRenderingDispatchBarrier.get()<<std::endl;
// wait till the rendering dispatch is done.
if (_endRenderingDispatchBarrier.valid()) _endRenderingDispatchBarrier->block();
@@ -839,12 +839,12 @@ void ViewerBase::renderingTraversals()
{
// osg::Timer_t startTick = osg::Timer::instance()->tick();
_endDynamicDrawBlock->block();
// NOTIFY(osg::NOTICE)<<"Time waiting "<<osg::Timer::instance()->delta_m(startTick, osg::Timer::instance()->tick())<<std::endl;;
// OSG_NOTIFY(osg::NOTICE)<<"Time waiting "<<osg::Timer::instance()->delta_m(startTick, osg::Timer::instance()->tick())<<std::endl;;
}
if (_releaseContextAtEndOfFrameHint && doneMakeCurrentInThisThread)
{
//NOTIFY(osg::NOTICE)<<"Doing release context"<<std::endl;
//OSG_NOTIFY(osg::NOTICE)<<"Doing release context"<<std::endl;
releaseContext();
}

View File

@@ -150,7 +150,7 @@ void WindowSizeHandler::toggleFullscreen(osgViewer::GraphicsWindow *window)
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;
}
@@ -179,7 +179,7 @@ void WindowSizeHandler::toggleFullscreen(osgViewer::GraphicsWindow *window)
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;
}
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."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Threading model 'CullDrawThreadPerContext' selected."<<std::endl;
break;
case(osgViewer::ViewerBase::CullDrawThreadPerContext):
viewerBase->setThreadingModel(osgViewer::ViewerBase::DrawThreadPerContext);
NOTIFY(osg::NOTICE)<<"Threading model 'DrawThreadPerContext' selected."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Threading model 'DrawThreadPerContext' selected."<<std::endl;
break;
case(osgViewer::ViewerBase::DrawThreadPerContext):
viewerBase->setThreadingModel(osgViewer::ViewerBase::CullThreadPerCameraDrawThreadPerContext);
NOTIFY(osg::NOTICE)<<"Threading model 'CullThreadPerCameraDrawThreadPerContext' selected."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Threading model 'CullThreadPerCameraDrawThreadPerContext' selected."<<std::endl;
break;
case(osgViewer::ViewerBase::CullThreadPerCameraDrawThreadPerContext):
viewerBase->setThreadingModel(osgViewer::ViewerBase::SingleThreaded);
NOTIFY(osg::NOTICE)<<"Threading model 'SingleThreaded' selected."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Threading model 'SingleThreaded' selected."<<std::endl;
break;
#if 1
case(osgViewer::ViewerBase::AutomaticSelection):
viewerBase->setThreadingModel(osgViewer::ViewerBase::SingleThreaded);
NOTIFY(osg::NOTICE)<<"Threading model 'SingleThreaded' selected."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Threading model 'SingleThreaded' selected."<<std::endl;
#else
case(osgViewer::ViewerBase::AutomaticSelection):
viewerBase->setThreadingModel(viewer->suggestBestThreadingModel());
NOTIFY(osg::NOTICE)<<"Threading model 'AutomaticSelection' selected."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Threading model 'AutomaticSelection' selected."<<std::endl;
#endif
break;
}
@@ -365,11 +365,11 @@ bool ThreadingHandler::handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIAction
{
case(osgViewer::Viewer::BeforeSwapBuffers):
viewer->setEndBarrierPosition(osgViewer::Viewer::AfterSwapBuffers);
NOTIFY(osg::NOTICE)<<"Threading model 'AfterSwapBuffers' selected."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Threading model 'AfterSwapBuffers' selected."<<std::endl;
break;
case(osgViewer::Viewer::AfterSwapBuffers):
viewer->setEndBarrierPosition(osgViewer::Viewer::BeforeSwapBuffers);
NOTIFY(osg::NOTICE)<<"Threading model 'BeforeSwapBuffers' selected."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Threading model 'BeforeSwapBuffers' selected."<<std::endl;
break;
}
@@ -480,7 +480,7 @@ bool RecordCameraPathHandler::handle(const osgGA::GUIEventAdapter &ea, osgGA::GU
}
ss << "."<<osgDB::getFileExtension(_filename);
NOTIFY(osg::NOTICE) << "Recording camera path to file " << ss.str() << std::endl;
OSG_NOTIFY(osg::NOTICE) << "Recording camera path to file " << ss.str() << std::endl;
_fout.open( ss.str().c_str() );
// make sure doubles are not trucated by default stream precision = 6
@@ -488,7 +488,7 @@ bool RecordCameraPathHandler::handle(const osgGA::GUIEventAdapter &ea, osgGA::GU
}
else
{
NOTIFY(osg::NOTICE)<<"Recording camera path."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Recording camera path."<<std::endl;
}
}
@@ -521,7 +521,7 @@ bool RecordCameraPathHandler::handle(const osgGA::GUIEventAdapter &ea, osgGA::GU
// In the future this will need to be written continuously, rather
// than all at once.
osgDB::ofstream out(_filename.c_str());
NOTIFY(osg::NOTICE)<<"Writing camera file: "<<_filename<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Writing camera file: "<<_filename<<std::endl;
_animPath->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 = "<<camera->getLODScale()<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"LODScale = "<<camera->getLODScale()<<std::endl;
aa.requestRedraw();
return true;
@@ -594,7 +594,7 @@ bool LODScaleHandler::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionA
else if (ea.getKey() == _keyEventDecreaseLODScale)
{
camera->setLODScale(camera->getLODScale()/1.1);
NOTIFY(osg::NOTICE)<<"LODScale = "<<camera->getLODScale()<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"LODScale = "<<camera->getLODScale()<<std::endl;
aa.requestRedraw();
return true;