conversion of osg::notify to OSG_INFO etc.

This commit is contained in:
Robert Osfield
2010-05-28 15:56:43 +00:00
parent a812f39f40
commit ddf5668809
17 changed files with 377 additions and 377 deletions

View File

@@ -96,7 +96,7 @@ void CompositeViewer::constructorInit()
CompositeViewer::~CompositeViewer()
{
OSG_NOTIFY(osg::INFO)<<"CompositeViewer::~CompositeViewer()"<<std::endl;
OSG_INFO<<"CompositeViewer::~CompositeViewer()"<<std::endl;
stopThreading();
@@ -126,12 +126,12 @@ CompositeViewer::~CompositeViewer()
(*citr)->close();
}
OSG_NOTIFY(osg::INFO)<<"finished CompositeViewer::~CompositeViewer()"<<std::endl;
OSG_INFO<<"finished CompositeViewer::~CompositeViewer()"<<std::endl;
}
bool CompositeViewer::readConfiguration(const std::string& filename)
{
OSG_NOTIFY(osg::NOTICE)<<"CompositeViewer::readConfiguration("<<filename<<")"<<std::endl;
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()
{
OSG_NOTIFY(osg::INFO)<<"CompositeViewer::init()"<<std::endl;
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()
{
//OSG_NOTIFY(osg::INFO)<<"CompositeViewer::realize()"<<std::endl;
//OSG_INFO<<"CompositeViewer::realize()"<<std::endl;
setCameraWithFocus(0);
if (_views.empty())
{
OSG_NOTIFY(osg::NOTICE)<<"CompositeViewer::realize() - not views to realize."<<std::endl;
OSG_NOTICE<<"CompositeViewer::realize() - not views to realize."<<std::endl;
_done = true;
return;
}
@@ -525,7 +525,7 @@ void CompositeViewer::realize()
if (contexts.empty())
{
OSG_NOTIFY(osg::INFO)<<"CompositeViewer::realize() - No valid contexts found, setting up view across all screens."<<std::endl;
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())
{
OSG_NOTIFY(osg::NOTICE)<<"CompositeViewer::realize() - failed to set up any windows"<<std::endl;
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());
// OSG_NOTIFY(osg::NOTICE)<<"CompositeViewer::frameEventTraversal()."<<std::endl;
// 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();
//OSG_NOTIFY(osg::NOTICE)<<"event->getGraphicsContext()="<<event->getGraphicsContext()<<std::endl;
//OSG_NOTICE<<"event->getGraphicsContext()="<<event->getGraphicsContext()<<std::endl;
bool pointerEvent = false;
@@ -884,7 +884,7 @@ void CompositeViewer::eventTraversal()
}
// OSG_NOTIFY(osg::NOTICE)<<"mouseEventState Xmin = "<<eventState->getXmin()<<" Ymin="<<eventState->getYmin()<<" xMax="<<eventState->getXmax()<<" Ymax="<<eventState->getYmax()<<std::endl;
// 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()
}
// OSG_NOTIFY(osg::NOTICE)<<"Events "<<events.size()<<std::endl;
// OSG_NOTICE<<"Events "<<events.size()<<std::endl;
if ((_keyEventSetsDone!=0) || _quitEventSetsDone)
{

View File

@@ -29,7 +29,7 @@
{
OSErr error = SetSystemUIMode(kUIModeAllHidden, kUIOptionAutoShowMenuBar);
if (error) {
osg::notify(osg::DEBUG_INFO) << "MenubarToggler::hide failed with " << error << std::endl;
OSG_DEBUG << "MenubarToggler::hide failed with " << error << std::endl;
}
}
@@ -38,7 +38,7 @@
{
OSErr error = SetSystemUIMode(kUIModeNormal, 0);
if (error) {
osg::notify(osg::DEBUG_INFO) << "MenubarToggler::show failed with " << error << std::endl;
OSG_DEBUG << "MenubarToggler::show failed with " << error << std::endl;
}
}
@@ -130,8 +130,8 @@ void MenubarController::update()
if (CGRectIntersectsRect(_mainScreenBounds, windowBounds))
{
++windowsIntersectingMainScreen;
// osg::notify(osg::ALWAYS) << "testing rect " << windowBounds.origin.x << "/" << windowBounds.origin.y << " " << windowBounds.size.width << "x" << windowBounds.size.height << std::endl;
// osg::notify(osg::ALWAYS) << "against " << _availRect.origin.x << "/" << _availRect.origin.y << " " << _availRect.size.width << "x" << _availRect.size.height << std::endl;
// OSG_ALWAYS << "testing rect " << windowBounds.origin.x << "/" << windowBounds.origin.y << " " << windowBounds.size.width << "x" << windowBounds.size.height << std::endl;
// OSG_ALWAYS << "against " << _availRect.origin.x << "/" << _availRect.origin.y << " " << _availRect.size.width << "x" << _availRect.size.height << std::endl;
// the window intersects the main-screen, does it intersect with the menubar/dock?
if (((_availRect.origin.y > _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<int>(bounds.origin.x);
y = static_cast<int>(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;
}

View File

@@ -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."<<std::endl;
OSG_NOTICE<<"Warning: GraphicsWindow not realized, cannot do makeCurrent."<<std::endl;
return false;
}
// OSG_NOTIFY(osg::NOTICE)<<"makeCurrentImplementation "<<this<<" "<<OpenThreads::Thread::CurrentThread()<<std::endl;
// OSG_NOTIFY(osg::NOTICE)<<" glXMakeCurrent ("<<_display<<","<<_window<<","<<_glxContext<<std::endl;
// OSG_NOTICE<<"makeCurrentImplementation "<<this<<" "<<OpenThreads::Thread::CurrentThread()<<std::endl;
// OSG_NOTICE<<" glXMakeCurrent ("<<_display<<","<<_window<<","<<_glxContext<<std::endl;
return (aglSetCurrentContext(NULL) == GL_TRUE);
}
@@ -480,7 +480,7 @@ bool GraphicsWindowCarbon::releaseContextImplementation()
void GraphicsWindowCarbon::closeImplementation()
{
// OSG_NOTIFY(osg::INFO) << "GraphicsWindowCarbon::closeImplementation" << std::endl;
// OSG_INFO << "GraphicsWindowCarbon::closeImplementation" << std::endl;
_valid = false;
_realized = false;
@@ -516,7 +516,7 @@ void GraphicsWindowCarbon::swapBuffersImplementation()
const bool on = _traits->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<DarwinWindowingSystemInterface*>(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<DarwinWindowingSystemInterface*>(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;
}

View File

@@ -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<DarwinWindowingSystemInterface*>(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)) {

View File

@@ -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<int>(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)."<<std::endl;
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)
{
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<int>(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;
}
}

View File

@@ -44,12 +44,12 @@ bool checkEGLError(const char* str)
EGLint err = eglGetError();
if (err != EGL_SUCCESS)
{
OSG_NOTIFY(osg::WARN)<<"Warning: "<<str<<" EGL error "<<std::hex<<err<<std::dec<<std::endl;
OSG_WARN<<"Warning: "<<str<<" EGL error "<<std::hex<<err<<std::dec<<std::endl;
return true;
}
else
{
// OSG_NOTIFY(osg::WARN)<<"EGL reports no errors: "<<str<<std::endl;
// OSG_WARN<<"EGL reports no errors: "<<str<<std::endl;
return false;
}
}
@@ -309,7 +309,7 @@ bool GraphicsWindowX11::createVisualInfo()
int depth = DefaultDepth( _display, _traits->screenNum );
if (XMatchVisualInfo( _display, _traits->screenNum, depth, TrueColor, _visualInfo )==0)
{
OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::createVisualInfo() failed."<<std::endl;
OSG_NOTICE<<"GraphicsWindowX11::createVisualInfo() failed."<<std::endl;
return false;
}
@@ -381,7 +381,7 @@ bool GraphicsWindowX11::checkAndSendEventFullScreenIfNeeded(Display* display, in
{
osg::GraphicsContext::WindowingSystemInterface *wsi = osg::GraphicsContext::getWindowingSystemInterface();
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 false;
}
@@ -456,7 +456,7 @@ bool GraphicsWindowX11::setWindowDecorationImplementation(bool flag)
}
else
{
OSG_NOTIFY(osg::NOTICE)<<"Error: GraphicsWindowX11::setBorder(" << flag << ") - couldn't change decorations." << std::endl;
OSG_NOTICE<<"Error: GraphicsWindowX11::setBorder(" << flag << ") - couldn't change decorations." << std::endl;
result = false;
}
@@ -645,7 +645,7 @@ void GraphicsWindowX11::init()
if (!_display)
{
OSG_NOTIFY(osg::NOTICE)<<"Error: Unable to open display \"" << XDisplayName(_traits->displayName().c_str()) << "\"."<<std::endl;
OSG_NOTICE<<"Error: Unable to open display \"" << XDisplayName(_traits->displayName().c_str()) << "\"."<<std::endl;
_valid = false;
return;
}
@@ -657,7 +657,7 @@ void GraphicsWindowX11::init()
EGLint eglMajorVersion, eglMinorVersion;
if (!eglInitialize(_eglDisplay, &eglMajorVersion, &eglMinorVersion))
{
OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::init() - eglInitialize() failed."<<std::endl;
OSG_NOTICE<<"GraphicsWindowX11::init() - eglInitialize() failed."<<std::endl;
XCloseDisplay( _display );
_display = 0;
@@ -665,14 +665,14 @@ void GraphicsWindowX11::init()
return;
}
OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::init() - eglInitialize() succeded eglMajorVersion="<<eglMajorVersion<<" iMinorVersion="<<eglMinorVersion<<std::endl;
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 )
{
OSG_NOTIFY(osg::NOTICE)<<"Error: " << XDisplayName(_traits->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="<<errorBase<<" eventBase="<<eventBase<<std::endl;
// OSG_NOTICE<<"GLX extension, errorBase="<<errorBase<<" eventBase="<<eventBase<<std::endl;
if (!createVisualInfo())
{
@@ -691,11 +691,11 @@ void GraphicsWindowX11::init()
_traits->alpha /= 2;
_traits->depth /= 2;
OSG_NOTIFY(osg::INFO)<<"Relaxing traits"<<std::endl;
OSG_INFO<<"Relaxing traits"<<std::endl;
if (!createVisualInfo())
{
OSG_NOTIFY(osg::NOTICE)<<"Error: Not able to create requested visual." << std::endl;
OSG_NOTICE<<"Error: Not able to create requested visual." << std::endl;
XCloseDisplay( _display );
_display = 0;
_valid = false;
@@ -718,7 +718,7 @@ void GraphicsWindowX11::init()
return;
}
OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::init() - window created ="<<_valid<<std::endl;
OSG_NOTICE<<"GraphicsWindowX11::init() - window created ="<<_valid<<std::endl;
EGLConfig eglConfig = 0;
@@ -742,7 +742,7 @@ void GraphicsWindowX11::init()
int numConfigs;
if (!eglChooseConfig(_eglDisplay, configAttribs, &eglConfig, 1, &numConfigs) || (numConfigs != 1))
{
OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::init() - eglChooseConfig() failed."<<std::endl;
OSG_NOTICE<<"GraphicsWindowX11::init() - eglChooseConfig() failed."<<std::endl;
XCloseDisplay( _display );
_valid = false;
_display = 0;
@@ -754,7 +754,7 @@ void GraphicsWindowX11::init()
_eglSurface = eglCreateWindowSurface(_eglDisplay, eglConfig, (EGLNativeWindowType)_window, NULL);
if (_eglSurface == EGL_NO_SURFACE)
{
OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::init() - eglCreateWindowSurface(..) failed."<<std::endl;
OSG_NOTICE<<"GraphicsWindowX11::init() - eglCreateWindowSurface(..) failed."<<std::endl;
XCloseDisplay( _display );
_valid = false;
_display = 0;
@@ -774,7 +774,7 @@ void GraphicsWindowX11::init()
_context = eglCreateContext(_eglDisplay, eglConfig, sharedContext, contextAttribs);
if (_context == EGL_NO_CONTEXT)
{
OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::init() - eglCreateContext(..) failed."<<std::endl;
OSG_NOTICE<<"GraphicsWindowX11::init() - eglCreateContext(..) failed."<<std::endl;
XCloseDisplay( _display );
_valid = false;
_display = 0;
@@ -791,7 +791,7 @@ void GraphicsWindowX11::init()
if (!_context)
{
OSG_NOTIFY(osg::NOTICE)<<"Error: Unable to create OpenGL graphics context."<<std::endl;
OSG_NOTICE<<"Error: Unable to create OpenGL graphics context."<<std::endl;
XCloseDisplay( _display );
_display = 0;
_valid = false;
@@ -838,7 +838,7 @@ bool GraphicsWindowX11::createWindow()
swatt.override_redirect = true;
mask |= CWOverrideRedirect;
OSG_NOTIFY(osg::INFO)<<"Setting override redirect"<<std::endl;
OSG_INFO<<"Setting override redirect"<<std::endl;
}
_window = XCreateWindow( _display, _parent,
@@ -850,7 +850,7 @@ bool GraphicsWindowX11::createWindow()
if (!_window)
{
OSG_NOTIFY(osg::NOTICE)<<"Error: Unable to create Window."<<std::endl;
OSG_NOTICE<<"Error: Unable to create Window."<<std::endl;
_context = 0;
return false;
}
@@ -895,7 +895,7 @@ bool GraphicsWindowX11::createWindow()
resized( watt.x, watt.y, watt.width, watt.height );
}
//OSG_NOTIFY(osg::NOTICE)<<"After sync apply.x = "<<watt.x<<" watt.y="<<watt.y<<" width="<<watt.width<<" height="<<watt.height<<std::endl;
//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 |
@@ -914,20 +914,20 @@ bool GraphicsWindowX11::setWindow(Window window)
{
if (_initialized)
{
OSG_NOTIFY(osg::NOTICE) << "GraphicsWindowX11::setWindow() - Window already created; it cannot be changed";
OSG_NOTICE << "GraphicsWindowX11::setWindow() - Window already created; it cannot be changed";
return false;
}
if (window==0)
{
OSG_NOTIFY(osg::NOTICE) << "GraphicsWindowX11::setWindow() - Invalid window handle passed ";
OSG_NOTICE << "GraphicsWindowX11::setWindow() - Invalid window handle passed ";
return false;
}
_window = window;
if (_window==0)
{
OSG_NOTIFY(osg::NOTICE) << "GraphicsWindowX11::setWindow() - Unable to retrieve native window handle";
OSG_NOTICE << "GraphicsWindowX11::setWindow() - Unable to retrieve native window handle";
return false;
}
@@ -957,7 +957,7 @@ bool GraphicsWindowX11::realizeImplementation()
{
if (_realized)
{
OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::realizeImplementation() Already realized"<<std::endl;
OSG_NOTICE<<"GraphicsWindowX11::realizeImplementation() Already realized"<<std::endl;
return true;
}
@@ -979,7 +979,7 @@ bool GraphicsWindowX11::makeCurrentImplementation()
{
if (!_realized)
{
OSG_NOTIFY(osg::NOTICE)<<"Warning: GraphicsWindow not realized, cannot do makeCurrent."<<std::endl;
OSG_NOTICE<<"Warning: GraphicsWindow not realized, cannot do makeCurrent."<<std::endl;
return false;
}
@@ -996,7 +996,7 @@ bool GraphicsWindowX11::releaseContextImplementation()
{
if (!_realized)
{
OSG_NOTIFY(osg::NOTICE)<<"Warning: GraphicsWindow not realized, cannot do release context."<<std::endl;
OSG_NOTICE<<"Warning: GraphicsWindow not realized, cannot do release context."<<std::endl;
return false;
}
@@ -1012,7 +1012,7 @@ bool GraphicsWindowX11::releaseContextImplementation()
void GraphicsWindowX11::closeImplementation()
{
// OSG_NOTIFY(osg::NOTICE)<<"Closing GraphicsWindowX11"<<std::endl;
// OSG_NOTICE<<"Closing GraphicsWindowX11"<<std::endl;
if (_eventDisplay)
{
@@ -1070,7 +1070,7 @@ void GraphicsWindowX11::swapBuffersImplementation()
{
if (!_realized) return;
// OSG_NOTIFY(osg::NOTICE)<<"swapBuffersImplementation "<<this<<" "<<OpenThreads::Thread::CurrentThread()<<std::endl;
// OSG_NOTICE<<"swapBuffersImplementation "<<this<<" "<<OpenThreads::Thread::CurrentThread()<<std::endl;
#ifdef OSG_USE_EGL
eglSwapBuffers( _eglDisplay, _eglSurface );
@@ -1099,7 +1099,7 @@ void GraphicsWindowX11::swapBuffersImplementation()
{
if (static_cast<Atom>(ev.xclient.data.l[0]) == _deleteWindow)
{
OSG_NOTIFY(osg::INFO)<<"DeleteWindow event received"<<std::endl;
OSG_INFO<<"DeleteWindow event received"<<std::endl;
getEventQueue()->closeWindow();
}
}
@@ -1118,7 +1118,7 @@ void GraphicsWindowX11::checkEvents()
double resizeTime = eventTime;
_timeOfLastCheckEvents = getEventQueue()->getTime();
// OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindowX11::checkEvents() : getEventQueue()->getCurrentEventState()->getGraphicsContext()="<<getEventQueue()->getCurrentEventState()->getGraphicsContext()<<std::endl;
// OSG_NOTICE<<"GraphicsWindowX11::checkEvents() : getEventQueue()->getCurrentEventState()->getGraphicsContext()="<<getEventQueue()->getCurrentEventState()->getGraphicsContext()<<std::endl;
int windowX = _traits->x;
int windowY = _traits->y;
@@ -1129,7 +1129,7 @@ void GraphicsWindowX11::checkEvents()
Time firstEventTime = 0;
// OSG_NOTIFY(osg::NOTICE)<<"Check events"<<std::endl;
// OSG_NOTICE<<"Check events"<<std::endl;
while( XPending(display) )
{
XEvent ev;
@@ -1139,36 +1139,36 @@ void GraphicsWindowX11::checkEvents()
{
case ClientMessage:
{
OSG_NOTIFY(osg::NOTICE)<<"ClientMessage event received"<<std::endl;
OSG_NOTICE<<"ClientMessage event received"<<std::endl;
if (static_cast<Atom>(ev.xclient.data.l[0]) == _deleteWindow)
{
OSG_NOTIFY(osg::NOTICE)<<"DeleteWindow event received"<<std::endl;
OSG_NOTICE<<"DeleteWindow event received"<<std::endl;
// FIXME only do if _ownsWindow ?
destroyWindowRequested = true;
getEventQueue()->closeWindow(eventTime);
}
}
case Expose :
OSG_NOTIFY(osg::INFO)<<"Expose x="<<ev.xexpose.x<<" y="<<ev.xexpose.y<<" width="<<ev.xexpose.width<<", height="<<ev.xexpose.height<<std::endl;
OSG_INFO<<"Expose x="<<ev.xexpose.x<<" y="<<ev.xexpose.y<<" width="<<ev.xexpose.width<<", height="<<ev.xexpose.height<<std::endl;
break;
case GravityNotify :
OSG_NOTIFY(osg::INFO)<<"GravityNotify event received"<<std::endl;
OSG_INFO<<"GravityNotify event received"<<std::endl;
break;
case ReparentNotify:
OSG_NOTIFY(osg::INFO)<<"ReparentNotify event received"<<std::endl;
OSG_INFO<<"ReparentNotify event received"<<std::endl;
break;
case DestroyNotify :
OSG_NOTIFY(osg::NOTICE)<<"DestroyNotify event received"<<std::endl;
OSG_NOTICE<<"DestroyNotify event received"<<std::endl;
_realized = false;
_valid = false;
break;
case ConfigureNotify :
{
OSG_NOTIFY(osg::INFO)<<"ConfigureNotify x="<<ev.xconfigure.x<<" y="<<ev.xconfigure.y<<" width="<<ev.xconfigure.width<<", height="<<ev.xconfigure.height<<std::endl;
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 ||
@@ -1188,13 +1188,13 @@ void GraphicsWindowX11::checkEvents()
case MapNotify :
{
OSG_NOTIFY(osg::INFO)<<"MapNotify"<<std::endl;
OSG_INFO<<"MapNotify"<<std::endl;
XWindowAttributes watt;
do
XGetWindowAttributes(display, _window, &watt );
while( watt.map_state != IsViewable );
OSG_NOTIFY(osg::INFO)<<"MapNotify x="<<watt.x<<" y="<<watt.y<<" width="<<watt.width<<", height="<<watt.height<<std::endl;
OSG_INFO<<"MapNotify x="<<watt.x<<" y="<<watt.y<<" width="<<watt.width<<", height="<<watt.height<<std::endl;
if (windowWidth != watt.width || windowHeight != watt.height)
{
@@ -1208,14 +1208,14 @@ void GraphicsWindowX11::checkEvents()
}
case FocusIn :
OSG_NOTIFY(osg::INFO)<<"FocusIn event received"<<std::endl;
OSG_INFO<<"FocusIn event received"<<std::endl;
flushKeyEvents();
break;
case UnmapNotify :
case FocusOut :
{
OSG_NOTIFY(osg::INFO)<<"FocusOut/UnmapNotify event received"<<std::endl;
OSG_INFO<<"FocusOut/UnmapNotify event received"<<std::endl;
if (ev.type == FocusOut && ev.xfocus.mode != NotifyNormal) break;
char modMap[32];
@@ -1238,14 +1238,14 @@ void GraphicsWindowX11::checkEvents()
}
case EnterNotify :
OSG_NOTIFY(osg::INFO)<<"EnterNotify event received"<<std::endl;
OSG_INFO<<"EnterNotify event received"<<std::endl;
_modifierState = ev.xcrossing.state;
syncLocks();
break;
case KeymapNotify :
{
OSG_NOTIFY(osg::INFO)<<"KeymapNotify event received"<<std::endl;
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.
@@ -1288,7 +1288,7 @@ void GraphicsWindowX11::checkEvents()
}
case MappingNotify :
OSG_NOTIFY(osg::INFO)<<"MappingNotify event received"<<std::endl;
OSG_INFO<<"MappingNotify event received"<<std::endl;
if (ev.xmapping.request == MappingModifier) rescanModifierMapping();
break;
@@ -1348,7 +1348,7 @@ void GraphicsWindowX11::checkEvents()
transformMouseXY(mx, my);
getEventQueue()->mouseMotion(mx, my, eventTime);
// OSG_NOTIFY(osg::NOTICE)<<"MotionNotify wx="<<wx<<" wy="<<wy<<" mx="<<mx<<" my="<<my<<std::endl;
// OSG_NOTICE<<"MotionNotify wx="<<wx<<" wy="<<wy<<" mx="<<mx<<" my="<<my<<std::endl;
break;
}
@@ -1448,7 +1448,7 @@ void GraphicsWindowX11::checkEvents()
}
default:
OSG_NOTIFY(osg::NOTICE)<<"Other event "<<ev.type<<std::endl;
OSG_NOTICE<<"Other event "<<ev.type<<std::endl;
break;
}
@@ -1661,30 +1661,30 @@ typedef int (*X11ErrorHandler)(Display*, XErrorEvent*);
int X11ErrorHandling(Display* display, XErrorEvent* event)
{
OSG_NOTIFY(osg::NOTICE)<<"Got an X11ErrorHandling call display="<<display<<" event="<<event<<std::endl;
OSG_NOTICE<<"Got an X11ErrorHandling call display="<<display<<" event="<<event<<std::endl;
char buffer[256];
XGetErrorText( display, event->error_code, buffer, 256);
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;
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)."<<std::endl;
OSG_NOTICE << "X11WindowingSystemInterface::_setScreen() is not fully implemented (missing depth)."<<std::endl;
Display* display = XOpenDisplay(si.displayName().c_str());
@@ -1710,7 +1710,7 @@ class X11WindowingSystemInterface : public osg::GraphicsContext::WindowingSystem
if(!sc)
{
OSG_NOTIFY(osg::NOTICE) << "Unable to create XRRScreenConfiguration on display \"" << XDisplayName(si.displayName().c_str()) << "\"."<<std::endl;
OSG_NOTICE << "Unable to create XRRScreenConfiguration on display \"" << XDisplayName(si.displayName().c_str()) << "\"."<<std::endl;
return false;
}
@@ -1752,11 +1752,11 @@ class X11WindowingSystemInterface : public osg::GraphicsContext::WindowingSystem
if(rate > 0.0f && !rateFound)
{
OSG_NOTIFY(osg::NOTICE) << "Unable to find valid refresh rate " << rate << " on display \"" << XDisplayName(si.displayName().c_str()) << "\"."<<std::endl;
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)
{
OSG_NOTIFY(osg::NOTICE) << "Unable to set resolution to " << width << "x" << height << " on display \"" << XDisplayName(si.displayName().c_str()) << "\"."<<std::endl;
OSG_NOTICE << "Unable to set resolution to " << width << "x" << height << " on display \"" << XDisplayName(si.displayName().c_str()) << "\"."<<std::endl;
}
else
{
@@ -1772,7 +1772,7 @@ class X11WindowingSystemInterface : public osg::GraphicsContext::WindowingSystem
}
else
{
OSG_NOTIFY(osg::NOTICE) << "Unable to open display \"" << XDisplayName(si.displayName().c_str()) << "\"."<<std::endl;
OSG_NOTICE << "Unable to open display \"" << XDisplayName(si.displayName().c_str()) << "\"."<<std::endl;
return false;
}
}
@@ -1785,7 +1785,7 @@ protected:
public:
X11WindowingSystemInterface()
{
OSG_NOTIFY(osg::INFO)<<"X11WindowingSystemInterface()"<<std::endl;
OSG_INFO<<"X11WindowingSystemInterface()"<<std::endl;
// Install an X11 error handler, if the application has not already done so.
@@ -1799,13 +1799,13 @@ public:
if ( currentHandler == defHandler )
{
// No application error handler, use ours.
// OSG_NOTIFY(osg::INFO)<<"Set osgViewer X11 error handler"<<std::endl;
// OSG_INFO<<"Set osgViewer X11 error handler"<<std::endl;
_errorHandlerSet = 1;
}
else
{
// Application error handler exists, leave it set.
// OSG_NOTIFY(osg::INFO)<<"Existing application X11 error handler set"<<std::endl;
// OSG_INFO<<"Existing application X11 error handler set"<<std::endl;
_errorHandlerSet = 0;
XSetErrorHandler(currentHandler);
}
@@ -1813,12 +1813,12 @@ public:
#if 0
if (XInitThreads() == 0)
{
OSG_NOTIFY(osg::NOTICE) << "Error: XInitThreads() failed. Aborting." << std::endl;
OSG_NOTICE << "Error: XInitThreads() failed. Aborting." << std::endl;
exit(1);
}
else
{
OSG_NOTIFY(osg::INFO) << "X11WindowingSystemInterface, xInitThreads() multi-threaded X support initialized.\n";
OSG_INFO << "X11WindowingSystemInterface, xInitThreads() multi-threaded X support initialized.\n";
}
#endif
@@ -1834,7 +1834,7 @@ public:
osg::Referenced::getDeleteHandler()->flushAll();
}
//OSG_NOTIFY(osg::NOTICE)<<"~X11WindowingSystemInterface()"<<std::endl;
//OSG_NOTICE<<"~X11WindowingSystemInterface()"<<std::endl;
// Unset our X11 error handler, providing the application has not replaced it.
@@ -1843,12 +1843,12 @@ public:
X11ErrorHandler currentHandler = XSetErrorHandler(NULL);
if ( currentHandler == X11ErrorHandling )
{
// OSG_NOTIFY(osg::INFO)<<"osgViewer X11 error handler removed"<<std::endl;
// OSG_INFO<<"osgViewer X11 error handler removed"<<std::endl;
}
else
{
// Not our error handler, leave it set.
// OSG_NOTIFY(osg::INFO)<<"Application X11 error handler left"<<std::endl;
// OSG_INFO<<"Application X11 error handler left"<<std::endl;
XSetErrorHandler(currentHandler);
}
}
@@ -1866,7 +1866,7 @@ public:
}
else
{
OSG_NOTIFY(osg::NOTICE) << "A Unable to open display \"" << XDisplayName(si.displayName().c_str()) << "\""<<std::endl;
OSG_NOTICE << "A Unable to open display \"" << XDisplayName(si.displayName().c_str()) << "\""<<std::endl;
return 0;
}
}
@@ -1901,7 +1901,7 @@ public:
}
else
{
OSG_NOTIFY(osg::NOTICE) << "Unable to open display \"" << XDisplayName(si.displayName().c_str()) << "\"."<<std::endl;
OSG_NOTICE << "Unable to open display \"" << XDisplayName(si.displayName().c_str()) << "\"."<<std::endl;
resolution.width = 0;
resolution.height = 0;
resolution.colorDepth = 0;
@@ -1914,7 +1914,7 @@ public:
#ifdef OSGVIEWER_USE_XRANDR
_setScreen(si, resolution.width, resolution.height, resolution.colorDepth, resolution.refreshRate);
#else
OSG_NOTIFY(osg::NOTICE) << "You must build osgViewer with Xrandr 1.2 or higher for setScreenSettings support!" << std::endl;
OSG_NOTICE << "You must build osgViewer with Xrandr 1.2 or higher for setScreenSettings support!" << std::endl;
#endif
return false;
}
@@ -1937,7 +1937,7 @@ public:
{
for(int i=0; i<nsizes; ++i)
{
OSG_NOTIFY(osg::INFO)<<"Screen size "<<screenSizes[i].width<<" "<<screenSizes[i].height<<" "<<screenSizes[i].mwidth<<" "<<screenSizes[i].mheight<<std::endl;
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);
@@ -1945,7 +1945,7 @@ public:
{
for(int j=0; j<nrates; ++j)
{
OSG_NOTIFY(osg::INFO)<<" rates "<<rates[j]<<std::endl;
OSG_INFO<<" rates "<<rates[j]<<std::endl;
resolutionList.push_back(osg::GraphicsContext::ScreenSettings(
screenSizes[i].width,
@@ -1972,7 +1972,7 @@ public:
if (resolutionList.empty())
{
OSG_NOTIFY(osg::NOTICE) << "X11WindowingSystemInterface::enumerateScreenSettings() not supported." << std::endl;
OSG_NOTICE << "X11WindowingSystemInterface::enumerateScreenSettings() not supported." << std::endl;
}
}
@@ -2004,13 +2004,13 @@ struct RegisterWindowingSystemInterfaceProxy
{
RegisterWindowingSystemInterfaceProxy()
{
OSG_NOTIFY(osg::INFO)<<"RegisterWindowingSystemInterfaceProxy()"<<std::endl;
OSG_INFO<<"RegisterWindowingSystemInterfaceProxy()"<<std::endl;
osg::GraphicsContext::setWindowingSystemInterface(new X11WindowingSystemInterface);
}
~RegisterWindowingSystemInterfaceProxy()
{
OSG_NOTIFY(osg::INFO)<<"~RegisterWindowingSystemInterfaceProxy()"<<std::endl;
OSG_INFO<<"~RegisterWindowingSystemInterfaceProxy()"<<std::endl;
if (osg::Referenced::getDeleteHandler())
{

View File

@@ -63,7 +63,7 @@ void PixelBufferCarbon::init()
_context = NULL;
_pixelformat = PixelBufferCarbon::createPixelFormat(_traits.get());
if (!_pixelformat)
osg::notify(osg::WARN) << "PixelBufferCarbon::init could not create a valid pixelformat" << std::endl;
OSG_WARN << "PixelBufferCarbon::init could not create a valid pixelformat" << std::endl;
_valid = (_pixelformat != NULL);
}
@@ -74,7 +74,7 @@ void PixelBufferCarbon::init()
bool PixelBufferCarbon::realizeImplementation()
{
if (!_valid) {
osg::notify(osg::WARN) << "PixelBufferCarbon::realizeImplementation() aglChoosePixelFormat failed! " << aglErrorString(aglGetError()) << std::endl;
OSG_WARN << "PixelBufferCarbon::realizeImplementation() aglChoosePixelFormat failed! " << aglErrorString(aglGetError()) << std::endl;
return false;
}
@@ -90,7 +90,7 @@ bool PixelBufferCarbon::realizeImplementation()
_context = aglCreateContext (_pixelformat, sharedContext);
if (!_context) {
osg::notify(osg::WARN) << "PixelBufferCarbon::realizeImplementation() aglCreateContext failed! " << aglErrorString(aglGetError()) << std::endl;
OSG_WARN << "PixelBufferCarbon::realizeImplementation() aglCreateContext failed! " << aglErrorString(aglGetError()) << std::endl;
return false;
}
@@ -98,14 +98,14 @@ bool PixelBufferCarbon::realizeImplementation()
_realized = aglCreatePBuffer (_traits->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."<<std::endl;
OSG_NOTICE<<"GraphicsWindow::void bindPBufferToTextureImplementation(..) not implemented."<<std::endl;
}
/** Swap the front and back buffers implementation.

View File

@@ -97,7 +97,7 @@ void PixelBufferCocoa::closeImplementation()
/** Make this graphics context current.*/
bool PixelBufferCocoa::makeCurrentImplementation()
{
// osg::notify(osg::INFO) << "PixelBufferCocoa::makeCurrentImplementation" << std::endl;
// OSG_INFO << "PixelBufferCocoa::makeCurrentImplementation" << std::endl;
[_context makeCurrentContext];
return true;
@@ -113,7 +113,7 @@ bool PixelBufferCocoa::makeContextCurrentImplementation(osg::GraphicsContext* re
/** Release the graphics context.*/
bool PixelBufferCocoa::releaseContextImplementation()
{
// osg::notify(osg::INFO) << "PixelBufferCocoa::releaseContextImplementation" << std::endl;
// OSG_INFO << "PixelBufferCocoa::releaseContextImplementation" << std::endl;
[NSOpenGLContext clearCurrentContext];
return true;
@@ -128,7 +128,7 @@ void PixelBufferCocoa::bindPBufferToTextureImplementation( GLenum buffer )
/** Swap the front and back buffers.*/
void PixelBufferCocoa::swapBuffersImplementation()
{
osg::notify(osg::INFO) << "PixelBufferCocoa::swapBuffersImplementation" << std::endl;
OSG_INFO << "PixelBufferCocoa::swapBuffersImplementation" << std::endl;
[_context flushBuffer];
}

View File

@@ -258,14 +258,14 @@ void TemporaryWindow::create()
_instance,
0)))
{
OSG_NOTIFY(osg::WARN) << "PixelBufferWin32, could not create temporary window: " << sysError() << std::endl;
OSG_WARN << "PixelBufferWin32, could not create temporary window: " << sysError() << std::endl;
kill();
return;
}
if (!(_dc = GetDC(_handle)))
{
OSG_NOTIFY(osg::WARN) << "PixelBufferWin32, could not get device context for temporary window: " << sysError() << std::endl;
OSG_WARN << "PixelBufferWin32, could not get device context for temporary window: " << sysError() << std::endl;
kill();
return;
}
@@ -294,14 +294,14 @@ void TemporaryWindow::create()
if (!SetPixelFormat(_dc, visual_id, &pfd))
{
OSG_NOTIFY(osg::WARN) << "PixelBufferWin32, could not set pixel format for temporary window: " << sysError() << std::endl;
OSG_WARN << "PixelBufferWin32, could not set pixel format for temporary window: " << sysError() << std::endl;
kill();
return;
}
if (!(_context = wglCreateContext(_dc)))
{
OSG_NOTIFY(osg::WARN) << "PixelBufferWin32, could not get graphics context for temporary window: " << sysError() << std::endl;
OSG_WARN << "PixelBufferWin32, could not get graphics context for temporary window: " << sysError() << std::endl;
kill();
return;
}
@@ -345,7 +345,7 @@ bool TemporaryWindow::makeCurrent()
bool result = wglMakeCurrent(_dc, _context) == TRUE ? true : false;
if (!result)
{
OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32, could not make the temporary window's context active: " << sysError() << std::endl;
OSG_NOTICE << "PixelBufferWin32, could not make the temporary window's context active: " << sysError() << std::endl;
}
return result;
}
@@ -486,7 +486,7 @@ void PixelBufferWin32::init()
if (!wgle || !wgle->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<HWND>(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<HPBUFFERARB>(_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"<<std::endl;
OSG_NOTICE<<"PixelBufferWin32::realizeImplementation() Already realized"<<std::endl;
return true;
}
@@ -663,7 +663,7 @@ bool PixelBufferWin32::realizeImplementation()
{
if ( !wglShareLists(graphicsHandleWin32->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<HPBUFFERARB>(_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<HPBUFFERARB>(_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<HPBUFFERARB>(_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."<<std::endl;
OSG_NOTICE<<"Warning: GraphicsWindow not realized, cannot do makeCurrent."<<std::endl;
return false;
}
@@ -769,7 +769,7 @@ void PixelBufferWin32::bindPBufferToTextureImplementation( GLenum buffer )
if ( !wgle || !wgle->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<HPBUFFERARB>(_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<HPBUFFERARB>(_hwnd), bindBuffer) )
{
OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32::bindPBufferToTextureImplementation, wglBindTexImageARB error: " << sysError() << std::endl;
OSG_NOTICE << "PixelBufferWin32::bindPBufferToTextureImplementation, wglBindTexImageARB error: " << sysError() << std::endl;
}
_boundBuffer = bindBuffer;
}

View File

@@ -124,7 +124,7 @@ void PixelBufferX11::init()
if (!_display)
{
osg::notify(osg::NOTICE)<<"Error: Unable to open display \"" << XDisplayName(_traits->displayName().c_str()) << "\"."<<std::endl;
OSG_NOTICE<<"Error: Unable to open display \"" << XDisplayName(_traits->displayName().c_str()) << "\"."<<std::endl;
_valid = false;
return;
}
@@ -133,7 +133,7 @@ void PixelBufferX11::init()
int errorBase, eventBase;
if( glXQueryExtension( _display, &errorBase, &eventBase) == False )
{
osg::notify(osg::NOTICE)<<"Error: " << XDisplayName(_traits->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="<<errorBase<<" eventBase="<<eventBase<<std::endl;
// OSG_NOTICE<<"GLX extension, errorBase="<<errorBase<<" eventBase="<<eventBase<<std::endl;
int major, minor;
if (glXQueryVersion(_display, &major, &minor) == False)
{
osg::notify(osg::NOTICE) << "Error: " << XDisplayName(_traits->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"<<std::endl;
OSG_INFO<<"Relaxing traits"<<std::endl;
if (!createVisualInfo())
{
osg::notify(osg::NOTICE)<<"Error: Not able to create requested visual." << std::endl;
OSG_NOTICE<<"Error: Not able to create requested visual." << std::endl;
XCloseDisplay( _display );
_display = 0;
_valid = false;
@@ -223,7 +223,7 @@ void PixelBufferX11::init()
if (!_context)
{
osg::notify(osg::NOTICE)<<"Error: Unable to create OpenGL graphics context."<<std::endl;
OSG_NOTICE<<"Error: Unable to create OpenGL graphics context."<<std::endl;
XCloseDisplay( _display );
_display = 0;
_valid = false;
@@ -268,9 +268,9 @@ void PixelBufferX11::init()
if (_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."<<std::endl;
OSG_NOTICE<<"Error: Unable to create pbuffer."<<std::endl;
XCloseDisplay( _display );
_display = 0;
_context = 0;
@@ -332,7 +332,7 @@ void PixelBufferX11::init()
void PixelBufferX11::closeImplementation()
{
// osg::notify(osg::NOTICE)<<"Closing PixelBufferX11"<<std::endl;
// OSG_NOTICE<<"Closing PixelBufferX11"<<std::endl;
if (_display)
{
if (_context)
@@ -395,7 +395,7 @@ void PixelBufferX11::init()
void PixelBufferX11::closeImplementation()
{
// osg::notify(osg::NOTICE)<<"Closing PixelBufferX11"<<std::endl;
// OSG_NOTICE<<"Closing PixelBufferX11"<<std::endl;
_pbuffer = 0;
_context = 0;
_initialized = false;
@@ -409,7 +409,7 @@ bool PixelBufferX11::realizeImplementation()
{
if (_realized)
{
osg::notify(osg::NOTICE)<<"PixelBufferX11::realizeImplementation() Already realized"<<std::endl;
OSG_NOTICE<<"PixelBufferX11::realizeImplementation() Already realized"<<std::endl;
return true;
}
@@ -426,11 +426,11 @@ bool PixelBufferX11::makeCurrentImplementation()
{
if (!_realized)
{
osg::notify(osg::NOTICE)<<"Warning: GraphicsWindow not realized, cannot do makeCurrent."<<std::endl;
OSG_NOTICE<<"Warning: GraphicsWindow not realized, cannot do makeCurrent."<<std::endl;
return false;
}
// osg::notify(osg::NOTICE)<<"PixelBufferX11::makeCurrentImplementation "<<this<<" "<<OpenThreads::Thread::CurrentThread()<<std::endl;
// OSG_NOTICE<<"PixelBufferX11::makeCurrentImplementation "<<this<<" "<<OpenThreads::Thread::CurrentThread()<<std::endl;
#ifdef OSG_USE_EGL
return eglMakeCurrent(_display, _pbuffer, _pbuffer, _context)==EGL_TRUE;
@@ -441,7 +441,7 @@ bool PixelBufferX11::makeCurrentImplementation()
bool PixelBufferX11::makeContextCurrentImplementation(osg::GraphicsContext* readContext)
{
// osg::notify(osg::NOTICE)<<"PixelBufferX11::makeContextCurrentImplementation() not implementation yet."<<std::endl;
// OSG_NOTICE<<"PixelBufferX11::makeContextCurrentImplementation() not implementation yet."<<std::endl;
return makeCurrentImplementation();
}
@@ -450,11 +450,11 @@ bool PixelBufferX11::releaseContextImplementation()
{
if (!_realized)
{
osg::notify(osg::NOTICE)<<"Warning: GraphicsWindow not realized, cannot do makeCurrent."<<std::endl;
OSG_NOTICE<<"Warning: GraphicsWindow not realized, cannot do makeCurrent."<<std::endl;
return false;
}
// osg::notify(osg::NOTICE)<<"PixelBufferX11::releaseContextImplementation() "<<this<<" "<<OpenThreads::Thread::CurrentThread()<<std::endl;
// OSG_NOTICE<<"PixelBufferX11::releaseContextImplementation() "<<this<<" "<<OpenThreads::Thread::CurrentThread()<<std::endl;
#ifdef OSG_USE_EGL
return eglMakeCurrent( _display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT )==EGL_TRUE;
@@ -466,14 +466,14 @@ bool PixelBufferX11::releaseContextImplementation()
void PixelBufferX11::bindPBufferToTextureImplementation(GLenum buffer)
{
osg::notify(osg::NOTICE)<<"PixelBufferX11::bindPBufferToTextureImplementation() not implementation yet."<<std::endl;
OSG_NOTICE<<"PixelBufferX11::bindPBufferToTextureImplementation() not implementation yet."<<std::endl;
}
void PixelBufferX11::swapBuffersImplementation()
{
if (!_realized) return;
// osg::notify(osg::NOTICE)<<"PixelBufferX11::swapBuffersImplementation "<<this<<" "<<OpenThreads::Thread::CurrentThread()<<std::endl;
// OSG_NOTICE<<"PixelBufferX11::swapBuffersImplementation "<<this<<" "<<OpenThreads::Thread::CurrentThread()<<std::endl;
#ifdef OSG_USE_EGL
eglSwapBuffers( _display, _pbuffer );

View File

@@ -31,8 +31,8 @@
using namespace osgViewer;
//#define DEBUG_MESSAGE if (isNotifyEnabled(NOTICE)) osg::notify(osg::NOTICE)
#define DEBUG_MESSAGE if (isNotifyEnabled(osg::DEBUG_FP)) osg::notify(osg::DEBUG_FP)
//#define DEBUG_MESSAGE OSG_NOTICE
#define DEBUG_MESSAGE OSG_DEBUG
OpenGLQuerySupport::OpenGLQuerySupport():
@@ -335,7 +335,7 @@ void Renderer::cull()
{
updateSceneView(sceneView);
// osg::notify(osg::NOTICE)<<"Culling buffer "<<_currentCull<<std::endl;
// OSG_NOTICE<<"Culling buffer "<<_currentCull<<std::endl;
// pass on the fusion distance settings from the View to the SceneView
osgViewer::View* view = dynamic_cast<osgViewer::View*>(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"<<std::endl;
// OSG_NOTICE<<"Completed in cull"<<std::endl;
state->getDynamicObjectRenderingCompletedCallback()->completed(state);
}
#endif
@@ -433,21 +433,21 @@ void Renderer::draw()
osgViewer::View* view = dynamic_cast<osgViewer::View*>(_camera->getView());
osgDB::DatabasePager* databasePager = view ? view->getDatabasePager() : 0;
// OSG_NOTIFY(osg::NOTICE)<<"Drawing buffer "<<_currentDraw<<std::endl;
// OSG_NOTICE<<"Drawing buffer "<<_currentDraw<<std::endl;
if (_done)
{
OSG_NOTIFY(osg::INFO)<<"Renderer::release() causing draw to exit"<<std::endl;
OSG_INFO<<"Renderer::release() causing draw to exit"<<std::endl;
return;
}
if (_graphicsThreadDoesCull)
{
OSG_NOTIFY(osg::INFO)<<"Renderer::draw() completing early due to change in _graphicsThreadDoesCull flag."<<std::endl;
OSG_INFO<<"Renderer::draw() completing early due to change in _graphicsThreadDoesCull flag."<<std::endl;
return;
}
// OSG_NOTIFY(osg::NOTICE)<<"RenderingOperation"<<std::endl;
// OSG_NOTICE<<"RenderingOperation"<<std::endl;
osg::Stats* stats = sceneView->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"<<std::endl;
// OSG_NOTICE<<"Completed in cull"<<std::endl;
state->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 = "<<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;
// OSG_NOTICE<<"Time wait for draw = "<<osg::Timer::instance()->delta_m(startDrawTick, beforeDrawTick)<<std::endl;
// OSG_NOTICE<<" time for draw = "<<osg::Timer::instance()->delta_m(beforeDrawTick, afterDrawTick)<<std::endl;
if (stats && stats->collectStats("rendering"))
{
@@ -541,7 +541,7 @@ void Renderer::cull_draw()
if (_done)
{
osg::notify(osg::INFO)<<"Render::release() causing cull_draw to exit"<<std::endl;
OSG_INFO<<"Render::release() causing cull_draw to exit"<<std::endl;
return;
}
@@ -559,7 +559,7 @@ void Renderer::cull_draw()
osg::GraphicsThread* compileThread = compileContext ? compileContext->getGraphicsThread() : 0;
// osg::notify(osg::NOTICE)<<"RenderingOperation"<<std::endl;
// OSG_NOTICE<<"RenderingOperation"<<std::endl;
// pass on the fusion distance settings from the View to the SceneView
if (view) sceneView->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 = "<<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;
OSG_NOTICE<<"total availableTime = "<<availableTime*1000.0<<std::endl;
OSG_NOTICE<<" flushTime = "<<flushTime*1000.0<<std::endl;
OSG_NOTICE<<" compileTime = "<<compileTime*1000.0<<std::endl;
#endif
if (compileThread)
@@ -707,7 +707,7 @@ void Renderer::flushAndCompile(double currentElapsedFrameTime, osgUtil::SceneVie
if (flushTime>0.0) compileTime += flushTime;
#if 0
OSG_NOTIFY(osg::NOTICE)<<" revised compileTime = "<<compileTime*1000.0<<std::endl;
OSG_NOTICE<<" revised compileTime = "<<compileTime*1000.0<<std::endl;
#endif
if (databasePager && databasePager->requiresExternalCompileGLObjects(sceneView->getState()->getContextID()))
@@ -739,7 +739,7 @@ void Renderer::operator () (osg::GraphicsContext* context)
void Renderer::release()
{
OSG_NOTIFY(osg::INFO)<<"Renderer::release()"<<std::endl;
OSG_INFO<<"Renderer::release()"<<std::endl;
_done = true;
_availableQueue.release();

View File

@@ -152,19 +152,19 @@ WindowCaptureCallback::ContextData::ContextData(osg::GraphicsContext* gc, Mode m
{
if (gc->getTraits()->alpha)
{
osg::notify(level)<<"ScreenCaptureHandler: Selected GL_RGBA read back format"<<std::endl;
OSG_NOTIFY(level)<<"ScreenCaptureHandler: Selected GL_RGBA read back format"<<std::endl;
_pixelFormat = GL_RGBA;
}
else
{
osg::notify(level)<<"ScreenCaptureHandler: Selected GL_RGB read back format"<<std::endl;
OSG_NOTIFY(level)<<"ScreenCaptureHandler: Selected GL_RGB read back format"<<std::endl;
_pixelFormat = GL_RGB;
}
}
getSize(gc, _width, _height);
//osg::notify(osg::NOTICE)<<"Window size "<<_width<<", "<<_height<<std::endl;
//OSG_NOTICE<<"Window size "<<_width<<", "<<_height<<std::endl;
// single buffered image
_imageBuffer.push_back(new osg::Image);
@@ -173,19 +173,19 @@ WindowCaptureCallback::ContextData::ContextData(osg::GraphicsContext* gc, Mode m
switch(_mode)
{
case(READ_PIXELS):
osg::notify(level)<<"ScreenCaptureHandler: Reading window using glReadPixels, without PixelBufferObject."<<std::endl;
OSG_NOTIFY(level)<<"ScreenCaptureHandler: Reading window using glReadPixels, without PixelBufferObject."<<std::endl;
break;
case(SINGLE_PBO):
osg::notify(level)<<"ScreenCaptureHandler: Reading window using glReadPixels, with a single PixelBufferObject."<<std::endl;
OSG_NOTIFY(level)<<"ScreenCaptureHandler: Reading window using glReadPixels, with a single PixelBufferObject."<<std::endl;
_pboBuffer.push_back(0);
break;
case(DOUBLE_PBO):
osg::notify(level)<<"ScreenCaptureHandler: Reading window using glReadPixels, with a double buffer PixelBufferObject."<<std::endl;
OSG_NOTIFY(level)<<"ScreenCaptureHandler: Reading window using glReadPixels, with a double buffer PixelBufferObject."<<std::endl;
_pboBuffer.push_back(0);
_pboBuffer.push_back(0);
break;
case(TRIPLE_PBO):
osg::notify(level)<<"ScreenCaptureHandler: Reading window using glReadPixels, with a triple buffer PixelBufferObject."<<std::endl;
OSG_NOTIFY(level)<<"ScreenCaptureHandler: Reading window using glReadPixels, with a triple buffer PixelBufferObject."<<std::endl;
_pboBuffer.push_back(0);
_pboBuffer.push_back(0);
_pboBuffer.push_back(0);
@@ -249,7 +249,7 @@ void WindowCaptureCallback::ContextData::readPixels()
getSize(_gc, width, height);
if (width!=_width || _height!=height)
{
//osg::notify(osg::NOTICE)<<" Window resized "<<width<<", "<<height<<std::endl;
//OSG_NOTICE<<" Window resized "<<width<<", "<<height<<std::endl;
_width = width;
_height = height;
}
@@ -285,7 +285,7 @@ void WindowCaptureCallback::ContextData::singlePBO(osg::GLBufferObject::Extensio
getSize(_gc, width, height);
if (width!=_width || _height!=height)
{
//osg::notify(osg::NOTICE)<<" Window resized "<<width<<", "<<height<<std::endl;
//OSG_NOTICE<<" Window resized "<<width<<", "<<height<<std::endl;
_width = width;
_height = height;
}
@@ -296,12 +296,12 @@ void WindowCaptureCallback::ContextData::singlePBO(osg::GLBufferObject::Extensio
if (image->s() != _width ||
image->t() != _height)
{
//osg::notify(osg::NOTICE)<<"ScreenCaptureHandler: Allocating image "<<std::endl;
//OSG_NOTICE<<"ScreenCaptureHandler: Allocating image "<<std::endl;
image->allocateImage(_width, _height, 1, _pixelFormat, _type);
if (pbo!=0)
{
//osg::notify(osg::NOTICE)<<"ScreenCaptureHandler: deleting pbo "<<pbo<<std::endl;
//OSG_NOTICE<<"ScreenCaptureHandler: deleting pbo "<<pbo<<std::endl;
ext->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 "<<pbo<<std::endl;
//OSG_NOTICE<<"ScreenCaptureHandler: Generating pbo "<<pbo<<std::endl;
}
else
{
@@ -361,7 +361,7 @@ void WindowCaptureCallback::ContextData::multiPBO(osg::GLBufferObject::Extension
getSize(_gc, width, height);
if (width!=_width || _height!=height)
{
//osg::notify(osg::NOTICE)<<" Window resized "<<width<<", "<<height<<std::endl;
//OSG_NOTICE<<" Window resized "<<width<<", "<<height<<std::endl;
_width = width;
_height = height;
}
@@ -373,19 +373,19 @@ void WindowCaptureCallback::ContextData::multiPBO(osg::GLBufferObject::Extension
if (image->s() != _width ||
image->t() != _height)
{
//osg::notify(osg::NOTICE)<<"ScreenCaptureHandler: Allocating image "<<std::endl;
//OSG_NOTICE<<"ScreenCaptureHandler: Allocating image "<<std::endl;
image->allocateImage(_width, _height, 1, _pixelFormat, _type);
if (read_pbo!=0)
{
//osg::notify(osg::NOTICE)<<"ScreenCaptureHandler: deleting pbo "<<read_pbo<<std::endl;
//OSG_NOTICE<<"ScreenCaptureHandler: deleting pbo "<<read_pbo<<std::endl;
ext->glDeleteBuffers (1, &read_pbo);
read_pbo = 0;
}
if (copy_pbo!=0)
{
//osg::notify(osg::NOTICE)<<"ScreenCaptureHandler: deleting pbo "<<copy_pbo<<std::endl;
//OSG_NOTICE<<"ScreenCaptureHandler: deleting pbo "<<copy_pbo<<std::endl;
ext->glDeleteBuffers (1, &copy_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 "<<read_pbo<<std::endl;
//OSG_NOTICE<<"ScreenCaptureHandler: Generating pbo "<<read_pbo<<std::endl;
}
if (read_pbo==0)
@@ -408,7 +408,7 @@ void WindowCaptureCallback::ContextData::multiPBO(osg::GLBufferObject::Extension
ext->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 "<<read_pbo<<std::endl;
//OSG_NOTICE<<"ScreenCaptureHandler: Generating pbo "<<read_pbo<<std::endl;
}
else
{
@@ -513,7 +513,7 @@ void WindowCaptureCallback::operator () (osg::RenderInfo& renderInfo) const
}
int prec = osg::notify(osg::INFO).precision(5);
osg::notify(osg::INFO) << "ScreenCaptureHandler: "
OSG_INFO << "ScreenCaptureHandler: "
<< "copy=" << (cd->_timeForFullCopy*1000.0f) << "ms, "
<< "operation=" << (cd->_timeForCaptureOperation*1000.0f) << "ms, "
<< "total=" << (cd->_timeForFullCopyAndOperation*1000.0f) << std::endl;
@@ -559,7 +559,7 @@ void ScreenCaptureHandler::WriteToFile::operator () (const osg::Image& image, co
osgDB::writeImageFile(image, filename.str());
osg::notify(osg::INFO)<<"ScreenCaptureHandler: Taking a screenshot, saved as '"<<filename.str()<<"'"<<std::endl;
OSG_INFO<<"ScreenCaptureHandler: Taking a screenshot, saved as '"<<filename.str()<<"'"<<std::endl;
if (_savePolicy == SEQUENTIAL_NUMBER)
{
@@ -681,13 +681,13 @@ osg::Camera* ScreenCaptureHandler::findAppropriateCameraForCallback(osgViewer::V
if (firstCamera)
{
//osg::notify(osg::NOTICE)<<"ScreenCaptureHandler: First camera "<<firstCamera<<std::endl;
//OSG_NOTICE<<"ScreenCaptureHandler: First camera "<<firstCamera<<std::endl;
return firstCamera;
}
else
{
osg::notify(osg::NOTICE)<<"ScreenCaptureHandler: No camera found"<<std::endl;
OSG_NOTICE<<"ScreenCaptureHandler: No camera found"<<std::endl;
}
}
}
@@ -729,13 +729,13 @@ osg::Camera* ScreenCaptureHandler::findAppropriateCameraForCallback(osgViewer::V
if (lastCamera)
{
//osg::notify(osg::NOTICE)<<"ScreenCaptureHandler: Last camera "<<lastCamera<<std::endl;
//OSG_NOTICE<<"ScreenCaptureHandler: Last camera "<<lastCamera<<std::endl;
return lastCamera;
}
else
{
osg::notify(osg::NOTICE)<<"ScreenCaptureHandler: No camera found"<<std::endl;
OSG_NOTICE<<"ScreenCaptureHandler: No camera found"<<std::endl;
}
}
}

View File

@@ -191,7 +191,7 @@ bool StatsHandler::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdap
{
if (viewer->getViewerStats())
{
osg::notify(osg::NOTICE)<<std::endl<<"Stats report:"<<std::endl;
OSG_NOTICE<<std::endl<<"Stats report:"<<std::endl;
typedef std::vector<osg::Stats*> 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)<<std::endl;
OSG_NOTICE<<std::endl;
}
}
@@ -517,7 +517,7 @@ struct ViewSceneStatsTextDrawCallback : public virtual osg::Drawable::DrawCallba
}
else
{
OSG_NOTIFY(osg::WARN)<<std::endl<<"No valid view to collect scene stats from"<<std::endl;
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())
{
OSG_NOTIFY(osg::DEBUG_INFO)<<"Found CoordianteSystemNode node"<<std::endl;
OSG_NOTIFY(osg::DEBUG_INFO)<<" CoordinateSystem = "<<node.getCoordinateSystem()<<std::endl;
OSG_DEBUG<<"Found CoordianteSystemNode node"<<std::endl;
OSG_DEBUG<<" CoordinateSystem = "<<node.getCoordinateSystem()<<std::endl;
_pathToCoordinateSystemNode = getNodePath();
}
else
{
OSG_NOTIFY(osg::DEBUG_INFO)<<"Found additional CoordianteSystemNode node, but ignoring"<<std::endl;
OSG_NOTIFY(osg::DEBUG_INFO)<<" CoordinateSystem = "<<node.getCoordinateSystem()<<std::endl;
OSG_DEBUG<<"Found additional CoordianteSystemNode node, but ignoring"<<std::endl;
OSG_DEBUG<<" CoordinateSystem = "<<node.getCoordinateSystem()<<std::endl;
}
traverse(node);
}
@@ -74,7 +74,7 @@ public:
virtual osg::CoordinateFrame getCoordinateFrame(const osg::Vec3d& position) const
{
OSG_NOTIFY(osg::DEBUG_INFO)<<"getCoordinateFrame("<<position<<")"<<std::endl;
OSG_DEBUG<<"getCoordinateFrame("<<position<<")"<<std::endl;
osg::NodePath tmpPath = _view->getCoordinateSystemNodePath();
@@ -105,19 +105,19 @@ public:
// reapply the position.
coordinateFrame.setTrans(pos);
OSG_NOTIFY(osg::DEBUG_INFO)<<"csn->computeLocalCoordinateFrame(position)* osg::computeLocalToWorld(tmpPath)"<<coordinateFrame<<std::endl;
OSG_DEBUG<<"csn->computeLocalCoordinateFrame(position)* osg::computeLocalToWorld(tmpPath)"<<coordinateFrame<<std::endl;
}
else
{
OSG_NOTIFY(osg::DEBUG_INFO)<<"osg::computeLocalToWorld(tmpPath)"<<std::endl;
OSG_DEBUG<<"osg::computeLocalToWorld(tmpPath)"<<std::endl;
coordinateFrame = osg::computeLocalToWorld(tmpPath);
}
return coordinateFrame;
}
else
{
OSG_NOTIFY(osg::DEBUG_INFO)<<" no coordinate system found, using default orientation"<<std::endl;
OSG_DEBUG<<" 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)
{
// OSG_NOTIFY(osg::NOTICE)<<"Constructing osgViewer::View"<<std::endl;
// 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()
{
OSG_NOTIFY(osg::INFO)<<"Destructing osgViewer::View"<<std::endl;
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()
{
OSG_NOTIFY(osg::INFO)<<"View::init()"<<std::endl;
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)
{
OSG_NOTIFY(osg::INFO)<<"View::setSceneData() Sharing scene "<<scene.get()<<std::endl;
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;
OSG_NOTIFY(osg::INFO)<<"View::setSceneData() Allocating new scene"<<_scene.get()<<std::endl;
OSG_INFO<<"View::setSceneData() Allocating new scene"<<_scene.get()<<std::endl;
}
else
{
OSG_NOTIFY(osg::INFO)<<"View::setSceneData() Reusing exisitng scene"<<_scene.get()<<std::endl;
OSG_INFO<<"View::setSceneData() Reusing exisitng scene"<<_scene.get()<<std::endl;
}
_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."<<std::endl;
OSG_NOTICE<<"View::setUpViewAcrossAllScreens() : Error, no WindowSystemInterface available, cannot create windows."<<std::endl;
return;
}
@@ -465,12 +465,12 @@ void View::setUpViewAcrossAllScreens()
osgViewer::GraphicsWindow* gw = dynamic_cast<osgViewer::GraphicsWindow*>(gc.get());
if (gw)
{
OSG_NOTIFY(osg::INFO)<<" GraphicsWindow has been created successfully."<<std::endl;
OSG_INFO<<" GraphicsWindow has been created successfully."<<std::endl;
gw->getEventQueue()->getCurrentEventState()->setWindowRectangle(0, 0, width, height );
}
else
{
OSG_NOTIFY(osg::NOTICE)<<" GraphicsWindow has not been created successfully."<<std::endl;
OSG_NOTICE<<" GraphicsWindow has not been created successfully."<<std::endl;
}
double newAspectRatio = double(traits->width) / double(traits->height);
@@ -534,13 +534,13 @@ void View::setUpViewAcrossAllScreens()
osgViewer::GraphicsWindow* gw = dynamic_cast<osgViewer::GraphicsWindow*>(gc.get());
if (gw)
{
OSG_NOTIFY(osg::INFO)<<" GraphicsWindow has been created successfully."<<gw<<std::endl;
OSG_INFO<<" GraphicsWindow has been created successfully."<<gw<<std::endl;
gw->getEventQueue()->getCurrentEventState()->setWindowRectangle(traits->x, traits->y, traits->width, traits->height );
}
else
{
OSG_NOTIFY(osg::NOTICE)<<" GraphicsWindow has not been created successfully."<<std::endl;
OSG_NOTICE<<" GraphicsWindow has not been created successfully."<<std::endl;
}
camera->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<osgViewer::GraphicsWindow*>(gc.get());
if (gw)
{
OSG_NOTIFY(osg::INFO)<<"View::setUpViewOnSingleScreen - GraphicsWindow has been created successfully."<<std::endl;
OSG_INFO<<"View::setUpViewOnSingleScreen - GraphicsWindow has been created successfully."<<std::endl;
gw->getEventQueue()->getCurrentEventState()->setWindowRectangle(x, y, width, height );
}
else
{
OSG_NOTIFY(osg::NOTICE)<<" GraphicsWindow has not been created successfully."<<std::endl;
OSG_NOTICE<<" GraphicsWindow has not been created successfully."<<std::endl;
}
double fovy, aspectRatio, zNear, zFar;
@@ -629,7 +629,7 @@ void View::setUpViewOnSingleScreen(unsigned int screenNum)
osg::GraphicsContext::WindowingSystemInterface* wsi = osg::GraphicsContext::getWindowingSystemInterface();
if (!wsi)
{
OSG_NOTIFY(osg::NOTICE)<<"View::setUpViewOnSingleScreen() : Error, no WindowSystemInterface available, cannot create windows."<<std::endl;
OSG_NOTICE<<"View::setUpViewOnSingleScreen() : Error, no WindowSystemInterface available, cannot create windows."<<std::endl;
return;
}
@@ -665,12 +665,12 @@ void View::setUpViewOnSingleScreen(unsigned int screenNum)
osgViewer::GraphicsWindow* gw = dynamic_cast<osgViewer::GraphicsWindow*>(gc.get());
if (gw)
{
OSG_NOTIFY(osg::INFO)<<"View::setUpViewOnSingleScreen - GraphicsWindow has been created successfully."<<std::endl;
OSG_INFO<<"View::setUpViewOnSingleScreen - GraphicsWindow has been created successfully."<<std::endl;
gw->getEventQueue()->getCurrentEventState()->setWindowRectangle(0, 0, width, height );
}
else
{
OSG_NOTIFY(osg::NOTICE)<<" GraphicsWindow has not been created successfully."<<std::endl;
OSG_NOTICE<<" GraphicsWindow has not been created successfully."<<std::endl;
}
double fovy, aspectRatio, zNear, zFar;
@@ -702,8 +702,8 @@ static osg::Geometry* create3DSphericalDisplayDistortionMesh(const osg::Vec3& or
osg::Vec3d projector = eye - osg::Vec3d(0.0,0.0, distance);
OSG_NOTIFY(osg::INFO)<<"create3DSphericalDisplayDistortionMesh : Projector position = "<<projector<<std::endl;
OSG_NOTIFY(osg::INFO)<<"create3DSphericalDisplayDistortionMesh : distance = "<<distance<<std::endl;
OSG_INFO<<"create3DSphericalDisplayDistortionMesh : Projector position = "<<projector<<std::endl;
OSG_INFO<<"create3DSphericalDisplayDistortionMesh : distance = "<<distance<<std::endl;
// create the quad to visualize.
@@ -752,7 +752,7 @@ static osg::Geometry* create3DSphericalDisplayDistortionMesh(const osg::Vec3& or
if (theta<0.0) theta += 2.0*osg::PI;
// OSG_NOTIFY(osg::NOTICE)<<"theta = "<<theta<< "phi="<<phi<<std::endl;
// OSG_NOTICE<<"theta = "<<theta<< "phi="<<phi<<std::endl;
osg::Vec3 texcoord(sin(phi) * cos(theta),
sin(phi) * sin(theta),
@@ -774,7 +774,7 @@ static osg::Geometry* create3DSphericalDisplayDistortionMesh(const osg::Vec3& or
cursor += dx;
}
// OSG_NOTIFY(osg::NOTICE)<<std::endl;
// OSG_NOTICE<<std::endl;
}
}
else
@@ -790,7 +790,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;
// OSG_NOTIFY(osg::NOTICE)<<"theta = "<<theta<< "phi="<<phi<<std::endl;
// 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);
@@ -818,7 +818,7 @@ static osg::Geometry* create3DSphericalDisplayDistortionMesh(const osg::Vec3& or
cursor += dx;
}
// OSG_NOTIFY(osg::NOTICE)<<std::endl;
// OSG_NOTICE<<std::endl;
}
}
@@ -847,11 +847,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)
{
OSG_NOTIFY(osg::INFO)<<"View::setUpViewFor3DSphericalDisplay(rad="<<radius<<", cllr="<<collar<<", sn="<<screenNum<<", im="<<intensityMap<<")"<<std::endl;
OSG_INFO<<"View::setUpViewFor3DSphericalDisplay(rad="<<radius<<", cllr="<<collar<<", sn="<<screenNum<<", im="<<intensityMap<<")"<<std::endl;
osg::GraphicsContext::WindowingSystemInterface* wsi = osg::GraphicsContext::getWindowingSystemInterface();
if (!wsi)
{
OSG_NOTIFY(osg::NOTICE)<<"Error, no WindowSystemInterface available, cannot create windows."<<std::endl;
OSG_NOTICE<<"Error, no WindowSystemInterface available, cannot create windows."<<std::endl;
return;
}
@@ -883,7 +883,7 @@ void View::setUpViewFor3DSphericalDisplay(double radius, double collar, unsigned
osg::ref_ptr<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());
if (!gc)
{
OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindow has not been created successfully."<<std::endl;
OSG_NOTICE<<"GraphicsWindow has not been created successfully."<<std::endl;
return;
}
@@ -1091,8 +1091,8 @@ static osg::Geometry* createParoramicSphericalDisplayDistortionMesh(const osg::V
osg::Vec3d projector = eye - osg::Vec3d(0.0,0.0, distance);
OSG_NOTIFY(osg::INFO)<<"createParoramicSphericalDisplayDistortionMesh : Projector position = "<<projector<<std::endl;
OSG_NOTIFY(osg::INFO)<<"createParoramicSphericalDisplayDistortionMesh : distance = "<<distance<<std::endl;
OSG_INFO<<"createParoramicSphericalDisplayDistortionMesh : Projector position = "<<projector<<std::endl;
OSG_INFO<<"createParoramicSphericalDisplayDistortionMesh : distance = "<<distance<<std::endl;
// create the quad to visualize.
osg::Geometry* geometry = new osg::Geometry();
@@ -1220,12 +1220,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)
{
OSG_NOTIFY(osg::INFO)<<"View::setUpViewForPanoramicSphericalDisplay(rad="<<radius<<", cllr="<<collar<<", sn="<<screenNum<<", im="<<intensityMap<<")"<<std::endl;
OSG_INFO<<"View::setUpViewForPanoramicSphericalDisplay(rad="<<radius<<", cllr="<<collar<<", sn="<<screenNum<<", im="<<intensityMap<<")"<<std::endl;
osg::GraphicsContext::WindowingSystemInterface* wsi = osg::GraphicsContext::getWindowingSystemInterface();
if (!wsi)
{
OSG_NOTIFY(osg::NOTICE)<<"Error, no WindowSystemInterface available, cannot create windows."<<std::endl;
OSG_NOTICE<<"Error, no WindowSystemInterface available, cannot create windows."<<std::endl;
return;
}
@@ -1258,7 +1258,7 @@ void View::setUpViewForPanoramicSphericalDisplay(double radius, double collar, u
osg::ref_ptr<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());
if (!gc)
{
OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindow has not been created successfully."<<std::endl;
OSG_NOTICE<<"GraphicsWindow has not been created successfully."<<std::endl;
return;
}
@@ -1350,12 +1350,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)
{
OSG_NOTIFY(osg::INFO)<<"View::setUpViewForWoWVxDisplay(...)"<<std::endl;
OSG_INFO<<"View::setUpViewForWoWVxDisplay(...)"<<std::endl;
osg::GraphicsContext::WindowingSystemInterface* wsi = osg::GraphicsContext::getWindowingSystemInterface();
if (!wsi)
{
OSG_NOTIFY(osg::NOTICE)<<"Error, no WindowSystemInterface available, cannot create windows."<<std::endl;
OSG_NOTICE<<"Error, no WindowSystemInterface available, cannot create windows."<<std::endl;
return;
}
@@ -1386,7 +1386,7 @@ void View::setUpViewForWoWVxDisplay(unsigned int screenNum, unsigned char wow_co
osg::ref_ptr<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());
if (!gc)
{
OSG_NOTIFY(osg::NOTICE)<<"GraphicsWindow has not been created successfully."<<std::endl;
OSG_NOTICE<<"GraphicsWindow has not been created successfully."<<std::endl;
return;
}
@@ -1600,7 +1600,7 @@ void View::setUpViewForWoWVxDisplay(unsigned int screenNum, unsigned char wow_co
void View::assignSceneDataToCameras()
{
// OSG_NOTIFY(osg::NOTICE)<<"View::assignSceneDataToCameras()"<<std::endl;
// OSG_NOTICE<<"View::assignSceneDataToCameras()"<<std::endl;
osg::Node* sceneData = _scene.valid() ? _scene->getSceneData() : 0;
@@ -1645,7 +1645,7 @@ void View::requestRedraw()
}
else
{
OSG_NOTIFY(osg::INFO)<<"View::requestRedraw(), No viewer base has been assigned yet."<<std::endl;
OSG_INFO<<"View::requestRedraw(), No viewer base has been assigned yet."<<std::endl;
}
}
@@ -1657,13 +1657,13 @@ void View::requestContinuousUpdate(bool flag)
}
else
{
OSG_NOTIFY(osg::INFO)<<"View::requestContinuousUpdate(), No viewer base has been assigned yet."<<std::endl;
OSG_INFO<<"View::requestContinuousUpdate(), No viewer base has been assigned yet."<<std::endl;
}
}
void View::requestWarpPointer(float x,float y)
{
OSG_NOTIFY(osg::INFO)<<"View::requestWarpPointer("<<x<<","<<y<<")"<<std::endl;
OSG_INFO<<"View::requestWarpPointer("<<x<<","<<y<<")"<<std::endl;
float local_x, local_y;
const osg::Camera* camera = getCameraContainingPosition(x, y, local_x, local_y);
@@ -1683,7 +1683,7 @@ void View::requestWarpPointer(float x,float y)
}
else
{
OSG_NOTIFY(osg::INFO)<<"View::requestWarpPointer failed no camera containing pointer"<<std::endl;
OSG_INFO<<"View::requestWarpPointer failed no camera containing pointer"<<std::endl;
}
}
@@ -1732,7 +1732,7 @@ const osg::Camera* View::getCameraContainingPosition(float x, float y, float& lo
local_x = new_x;
local_y = new_y;
OSG_NOTIFY(osg::INFO)<<"Returning master camera"<<std::endl;
OSG_INFO<<"Returning master camera"<<std::endl;
return _camera.get();
}
@@ -1753,7 +1753,7 @@ const osg::Camera* View::getCameraContainingPosition(float x, float y, float& lo
slave._camera->getAllowEventFocus() &&
slave._camera->getRenderTargetImplementation()==osg::Camera::FRAME_BUFFER)
{
OSG_NOTIFY(osg::INFO)<<"Testing slave camera "<<slave._camera->getName()<<std::endl;
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;
@@ -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="<<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;;
//OSG_NOTICE<<" x="<<x<<" y="<<y<<std::endl;;
//OSG_NOTICE<<" eventState->getXmin()="<<eventState->getXmin()<<" eventState->getXmax()="<<eventState->getXmax()<<std::endl;;
//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) )
{
// OSG_NOTIFY(osg::NOTICE)<<" in viewport "<<std::endl;;
// OSG_NOTICE<<" in viewport "<<std::endl;;
local_x = new_coord.x();
local_y = new_coord.y();
@@ -1782,7 +1782,7 @@ const osg::Camera* View::getCameraContainingPosition(float x, float y, float& lo
}
else
{
// OSG_NOTIFY(osg::NOTICE)<<" not in viewport "<<viewport->x()<<" "<<(viewport->x()+viewport->width())<<std::endl;;
// OSG_NOTICE<<" not in viewport "<<viewport->x()<<" "<<(viewport->x()+viewport->width())<<std::endl;;
}
}
@@ -1807,13 +1807,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
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;
OSG_NOTICE<<"View::computeIntersections(x="<<x<<", y="<<y<<", local_x="<<local_x<<", local_y="<<local_y<<") "<<cf<<std::endl;
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)
{
OSG_NOTIFY(osg::NOTICE)<<" window ("<<traits->x<<","<<traits->y<<","<<traits->width<<","<<traits->height<<")"<<std::endl;
OSG_NOTICE<<" window ("<<traits->x<<","<<traits->y<<","<<traits->width<<","<<traits->height<<")"<<std::endl;
}
#endif
@@ -1856,16 +1856,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);
OSG_NOTIFY(osg::NOTICE)<<"Using Dummy "<<timeDummy<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" KdTrees "<<timeKdTree
OSG_NOTICE<<"Using Dummy "<<timeDummy<<std::endl;
OSG_NOTICE<<" KdTrees "<<timeKdTree
<<"\tNum intersects = "<<intersectsBeforeConventional-intersectsBeforeKdTree<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" KdTrees - Traversal "<<timeKdTree-timeDummy<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<" Conventional "<<timeConventional
OSG_NOTICE<<" KdTrees - Traversal "<<timeKdTree-timeDummy<<std::endl;
OSG_NOTICE<<" Conventional "<<timeConventional
<<"\tNum intersects = "<<intersectsAfterConventional-intersectsBeforeConventional<<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;
OSG_NOTICE<<" Conventional - Traversal "<<timeConventional-timeDummy<<std::endl;
OSG_NOTICE<<" Delta "<<timeConventional/timeKdTree<<std::endl;
OSG_NOTICE<<" Delta sans Traversal "<<(timeConventional-timeDummy)/(timeKdTree-timeDummy)<<std::endl;
OSG_NOTICE<<std::endl;
#endif
if (picker->containsIntersections())

View File

@@ -100,7 +100,7 @@ Viewer::Viewer(osg::ArgumentParser& arguments)
}
else
{
OSG_NOTIFY(osg::WARN)<<"Invalid clear color \""<<colorStr<<"\""<<std::endl;
OSG_WARN<<"Invalid clear color \""<<colorStr<<"\""<<std::endl;
}
}
@@ -209,12 +209,12 @@ void Viewer::constructorInit()
Viewer::~Viewer()
{
//OSG_NOTIFY(osg::NOTICE)<<"Viewer::~Viewer()"<<std::endl;
//OSG_NOTICE<<"Viewer::~Viewer()"<<std::endl;
Threads threads;
getAllThreads(threads);
OSG_NOTIFY(osg::INFO)<<"Viewer::~Viewer():: start destructor getThreads = "<<threads.size()<<std::endl;
OSG_INFO<<"Viewer::~Viewer():: start destructor getThreads = "<<threads.size()<<std::endl;
stopThreading();
@@ -235,11 +235,11 @@ Viewer::~Viewer()
(*citr)->close();
}
//OSG_NOTIFY(osg::NOTICE)<<"finish Viewer::~Viewer()"<<std::endl;
//OSG_NOTICE<<"finish Viewer::~Viewer()"<<std::endl;
getAllThreads(threads);
OSG_NOTIFY(osg::INFO)<<"Viewer::~Viewer() end destructor getThreads = "<<threads.size()<<std::endl;
OSG_INFO<<"Viewer::~Viewer() end destructor getThreads = "<<threads.size()<<std::endl;
}
void Viewer::take(View& rhs)
@@ -285,19 +285,19 @@ void Viewer::take(View& rhs)
bool Viewer::readConfiguration(const std::string& filename)
{
OSG_NOTIFY(osg::INFO)<<"Viewer::readConfiguration("<<filename<<")"<<std::endl;
OSG_INFO<<"Viewer::readConfiguration("<<filename<<")"<<std::endl;
osg::ref_ptr<osg::Object> object = osgDB::readObjectFile(filename);
if (!object)
{
//OSG_NOTIFY(osg::NOTICE)<<"Error: Unable to load configuration file \""<<filename<<"\""<<std::endl;
//OSG_NOTICE<<"Error: Unable to load configuration file \""<<filename<<"\""<<std::endl;
return false;
}
CompositeViewer* compositeViewer = dynamic_cast<CompositeViewer*>(object.get());
if (compositeViewer)
{
OSG_NOTIFY(osg::NOTICE)<<"Error: Config file \""<<filename<<"\" containing CompositeViewer cannot be loaded by Viewer."<<std::endl;
OSG_NOTICE<<"Error: Config file \""<<filename<<"\" containing CompositeViewer cannot be loaded by Viewer."<<std::endl;
return false;
}
@@ -310,7 +310,7 @@ bool Viewer::readConfiguration(const std::string& filename)
}
else
{
OSG_NOTIFY(osg::NOTICE)<<"Error: Config file \""<<filename<<"\" does not contain a valid Viewer configuration."<<std::endl;
OSG_NOTICE<<"Error: Config file \""<<filename<<"\" does not contain a valid Viewer configuration."<<std::endl;
return false;
}
}
@@ -421,7 +421,7 @@ GraphicsWindowEmbedded* Viewer::setUpViewerAsEmbeddedInWindow(int x, int y, int
void Viewer::realize()
{
//OSG_NOTIFY(osg::INFO)<<"Viewer::realize()"<<std::endl;
//OSG_INFO<<"Viewer::realize()"<<std::endl;
setCameraWithFocus(0);
@@ -430,7 +430,7 @@ void Viewer::realize()
if (contexts.empty())
{
OSG_NOTIFY(osg::INFO)<<"Viewer::realize() - No valid contexts found, setting up view across all screens."<<std::endl;
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
@@ -475,7 +475,7 @@ void Viewer::realize()
if (contexts.empty())
{
OSG_NOTIFY(osg::NOTICE)<<"Viewer::realize() - failed to set up any windows"<<std::endl;
OSG_NOTICE<<"Viewer::realize() - failed to set up any windows"<<std::endl;
_done = true;
return;
}
@@ -605,7 +605,7 @@ void Viewer::eventTraversal()
double beginEventTraversal = osg::Timer::instance()->delta_s(_startTick, osg::Timer::instance()->tick());
// OSG_NOTIFY(osg::NOTICE)<<"Viewer::frameEventTraversal()."<<std::endl;
// OSG_NOTICE<<"Viewer::frameEventTraversal()."<<std::endl;
// need to copy events from the GraphicsWindow's into local EventQueue;
osgGA::EventQueue::Events events;
@@ -681,7 +681,7 @@ void Viewer::eventTraversal()
x >= viewport->x() && y >= viewport->y() &&
x <= (viewport->x()+viewport->width()) && y <= (viewport->y()+viewport->height()) )
{
// OSG_NOTIFY(osg::NOTICE)<<"setCamera with focus "<<camera->getName()<<" x="<<x<<" y="<<y<<std::endl;
// OSG_NOTICE<<"setCamera with focus "<<camera->getName()<<" x="<<x<<" y="<<y<<std::endl;
setCameraWithFocus(camera);
}
}
@@ -712,7 +712,7 @@ void Viewer::eventTraversal()
y = new_coord.y();
}
// OSG_NOTIFY(osg::NOTICE)<<"pointer event new_coord.x()="<<new_coord.x()<<" new_coord.y()="<<new_coord.y()<<std::endl;
// 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());
// OSG_NOTIFY(osg::NOTICE)<<"new x = "<<x<<" new y = "<<y<<std::endl;
// 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());
}
//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;
//OSG_NOTICE<<" mouse x = "<<event->getX()<<" y="<<event->getY()<<std::endl;
// 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()
}
// OSG_NOTIFY(osg::NOTICE)<<"mouseEventState Xmin = "<<eventState->getXmin()<<" Ymin="<<eventState->getYmin()<<" xMax="<<eventState->getXmax()<<" Ymax="<<eventState->getYmax()<<std::endl;
// 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
// OSG_NOTIFY(osg::NOTICE)<<"Events "<<events.size()<<std::endl;
// 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):
OSG_NOTIFY(osg::NOTICE)<<" PUSH "<<event->getButton()<<" x="<<event->getX()<<" y="<<event->getY()<<std::endl;
OSG_NOTICE<<" PUSH "<<event->getButton()<<" x="<<event->getX()<<" y="<<event->getY()<<std::endl;
break;
case(osgGA::GUIEventAdapter::RELEASE):
OSG_NOTIFY(osg::NOTICE)<<" RELEASE "<<event->getButton()<<" x="<<event->getX()<<" y="<<event->getY()<<std::endl;
OSG_NOTICE<<" RELEASE "<<event->getButton()<<" x="<<event->getX()<<" y="<<event->getY()<<std::endl;
break;
case(osgGA::GUIEventAdapter::DRAG):
OSG_NOTIFY(osg::NOTICE)<<" DRAG "<<event->getButtonMask()<<" x="<<event->getX()<<" y="<<event->getY()<<std::endl;
OSG_NOTICE<<" DRAG "<<event->getButtonMask()<<" x="<<event->getX()<<" y="<<event->getY()<<std::endl;
break;
case(osgGA::GUIEventAdapter::MOVE):
OSG_NOTIFY(osg::NOTICE)<<" MOVE "<<event->getButtonMask()<<" x="<<event->getX()<<" y="<<event->getY()<<std::endl;
OSG_NOTICE<<" MOVE "<<event->getButtonMask()<<" x="<<event->getX()<<" y="<<event->getY()<<std::endl;
break;
case(osgGA::GUIEventAdapter::SCROLL):
OSG_NOTIFY(osg::NOTICE)<<" SCROLL "<<event->getScrollingMotion()<<std::endl;
OSG_NOTICE<<" SCROLL "<<event->getScrollingMotion()<<std::endl;
break;
case(osgGA::GUIEventAdapter::KEYDOWN):
OSG_NOTIFY(osg::NOTICE)<<" KEYDOWN '"<<(char)event->getKey()<<"'"<<std::endl;
OSG_NOTICE<<" KEYDOWN '"<<(char)event->getKey()<<"'"<<std::endl;
break;
case(osgGA::GUIEventAdapter::KEYUP):
OSG_NOTIFY(osg::NOTICE)<<" KEYUP '"<<(char)event->getKey()<<"'"<<std::endl;
OSG_NOTICE<<" KEYUP '"<<(char)event->getKey()<<"'"<<std::endl;
break;
case(osgGA::GUIEventAdapter::RESIZE):
OSG_NOTIFY(osg::NOTICE)<<" RESIZE "<<event->getWindowX()<<"/"<<event->getWindowY()<<" x "<<event->getWindowWidth()<<"/"<<event->getWindowHeight() << std::endl;
OSG_NOTICE<<" RESIZE "<<event->getWindowX()<<"/"<<event->getWindowY()<<" x "<<event->getWindowWidth()<<"/"<<event->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 "<<std::endl;
// OSG_NOTICE<<" FRAME "<<std::endl;
break;
default:
// OSG_NOTIFY(osg::NOTICE)<<" Event not handled"<<std::endl;
// OSG_NOTICE<<" Event not handled"<<std::endl;
break;
}
}
#endif
// OSG_NOTIFY(osg::NOTICE)<<"Events "<<events.size()<<std::endl;
// OSG_NOTICE<<"Events "<<events.size()<<std::endl;
if ((_keyEventSetsDone!=0) || _quitEventSetsDone)
{

View File

@@ -183,7 +183,7 @@ void ViewerBase::stopThreading()
{
if (!_threadsRunning) return;
OSG_NOTIFY(osg::INFO)<<"ViewerBase::stopThreading() - stopping threading"<<std::endl;
OSG_INFO<<"ViewerBase::stopThreading() - stopping threading"<<std::endl;
Contexts contexts;
getContexts(contexts);
@@ -238,14 +238,14 @@ void ViewerBase::stopThreading()
_endRenderingDispatchBarrier = 0;
_endDynamicDrawBlock = 0;
OSG_NOTIFY(osg::INFO)<<"Viewer::stopThreading() - stopped threading."<<std::endl;
OSG_INFO<<"Viewer::stopThreading() - stopped threading."<<std::endl;
}
void ViewerBase::startThreading()
{
if (_threadsRunning) return;
OSG_NOTIFY(osg::INFO)<<"Viewer::startThreading() - starting threading"<<std::endl;
OSG_INFO<<"Viewer::startThreading() - starting threading"<<std::endl;
// release any context held by the main thread.
releaseContext();
@@ -255,7 +255,7 @@ void ViewerBase::startThreading()
Contexts contexts;
getContexts(contexts);
OSG_NOTIFY(osg::INFO)<<"Viewer::startThreading() - contexts.size()="<<contexts.size()<<std::endl;
OSG_INFO<<"Viewer::startThreading() - contexts.size()="<<contexts.size()<<std::endl;
Cameras cameras;
getCameras(cameras);
@@ -281,7 +281,7 @@ void ViewerBase::startThreading()
numThreadsOnEndBarrier = 1;
break;
default:
OSG_NOTIFY(osg::NOTICE)<<"Error: Threading model not selected"<<std::endl;
OSG_NOTICE<<"Error: Threading model not selected"<<std::endl;
return;
}
@@ -296,7 +296,7 @@ void ViewerBase::startThreading()
{
if ((*scitr)->getSceneData())
{
OSG_NOTIFY(osg::INFO)<<"Making scene thread safe"<<std::endl;
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);
@@ -375,7 +375,7 @@ void ViewerBase::startThreading()
if (!gc->isRealized())
{
OSG_NOTIFY(osg::INFO)<<"ViewerBase::startThreading() : Realizng window "<<gc<<std::endl;
OSG_INFO<<"ViewerBase::startThreading() : Realizng window "<<gc<<std::endl;
gc->realize();
}
@@ -450,7 +450,7 @@ void ViewerBase::startThreading()
osg::Camera* camera = *camItr;
if (camera->getCameraThread() && !camera->getCameraThread()->isRunning())
{
OSG_NOTIFY(osg::INFO)<<" camera->getCameraThread()-> "<<camera->getCameraThread()<<std::endl;
OSG_INFO<<" camera->getCameraThread()-> "<<camera->getCameraThread()<<std::endl;
camera->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() "<<gc->getGraphicsThread()<<std::endl;
OSG_INFO<<" gc->getGraphicsThread()->startThread() "<<gc->getGraphicsThread()<<std::endl;
gc->getGraphicsThread()->startThread();
// OpenThreads::Thread::YieldCurrentThread();
}
@@ -499,7 +499,7 @@ void ViewerBase::startThreading()
_threadsRunning = true;
OSG_NOTIFY(osg::INFO)<<"Set up threading"<<std::endl;
OSG_INFO<<"Set up threading"<<std::endl;
}
void ViewerBase::getWindows(Windows& windows, bool onlyValid)
@@ -523,7 +523,7 @@ void ViewerBase::checkWindowStatus()
Contexts contexts;
getContexts(contexts);
// OSG_NOTIFY(osg::NOTICE)<<"Viewer::checkWindowStatus() - "<<contexts.size()<<std::endl;
// OSG_NOTICE<<"Viewer::checkWindowStatus() - "<<contexts.size()<<std::endl;
if (contexts.size()==0)
{
@@ -612,7 +612,7 @@ void ViewerBase::frame(double simulationTime)
{
if (_done) return;
// OSG_NOTIFY(osg::NOTICE)<<std::endl<<"CompositeViewer::frame()"<<std::endl<<std::endl;
// OSG_NOTICE<<std::endl<<"CompositeViewer::frame()"<<std::endl<<std::endl;
if (_firstFrame)
{
@@ -649,7 +649,7 @@ void ViewerBase::renderingTraversals()
if (view)
{
const osg::Matrixd& m = view->getCamera()->getInverseViewMatrix();
OSG_NOTIFY(osg::NOTICE)<<"View "<<view<<", Master Camera position("<<m.getTrans()<<"), rotation("<<m.getRotate()<<")"<<std::endl;
OSG_NOTICE<<"View "<<view<<", Master Camera position("<<m.getTrans()<<"), rotation("<<m.getRotate()<<")"<<std::endl;
}
}
}
@@ -746,7 +746,7 @@ void ViewerBase::renderingTraversals()
}
}
// OSG_NOTIFY(osg::NOTICE)<<std::endl<<"Start frame"<<std::endl;
// OSG_NOTICE<<std::endl<<"Start frame"<<std::endl;
Contexts contexts;
@@ -796,7 +796,7 @@ void ViewerBase::renderingTraversals()
}
}
// OSG_NOTIFY(osg::NOTICE)<<"Joing _endRenderingDispatchBarrier block "<<_endRenderingDispatchBarrier.get()<<std::endl;
// OSG_NOTICE<<"Joing _endRenderingDispatchBarrier block "<<_endRenderingDispatchBarrier.get()<<std::endl;
// wait till the rendering dispatch is done.
if (_endRenderingDispatchBarrier.valid()) _endRenderingDispatchBarrier->block();
@@ -832,12 +832,12 @@ void ViewerBase::renderingTraversals()
{
// osg::Timer_t startTick = osg::Timer::instance()->tick();
_endDynamicDrawBlock->block();
// OSG_NOTIFY(osg::NOTICE)<<"Time waiting "<<osg::Timer::instance()->delta_m(startTick, osg::Timer::instance()->tick())<<std::endl;;
// OSG_NOTICE<<"Time waiting "<<osg::Timer::instance()->delta_m(startTick, osg::Timer::instance()->tick())<<std::endl;;
}
if (_releaseContextAtEndOfFrameHint && doneMakeCurrentInThisThread)
{
//OSG_NOTIFY(osg::NOTICE)<<"Doing release context"<<std::endl;
//OSG_NOTICE<<"Doing release context"<<std::endl;
releaseContext();
}

View File

@@ -150,7 +150,7 @@ void WindowSizeHandler::toggleFullscreen(osgViewer::GraphicsWindow *window)
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;
}
@@ -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());
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."<<std::endl;
OSG_NOTICE<<"Threading model 'CullDrawThreadPerContext' selected."<<std::endl;
break;
case(osgViewer::ViewerBase::CullDrawThreadPerContext):
viewerBase->setThreadingModel(osgViewer::ViewerBase::DrawThreadPerContext);
OSG_NOTIFY(osg::NOTICE)<<"Threading model 'DrawThreadPerContext' selected."<<std::endl;
OSG_NOTICE<<"Threading model 'DrawThreadPerContext' selected."<<std::endl;
break;
case(osgViewer::ViewerBase::DrawThreadPerContext):
viewerBase->setThreadingModel(osgViewer::ViewerBase::CullThreadPerCameraDrawThreadPerContext);
OSG_NOTIFY(osg::NOTICE)<<"Threading model 'CullThreadPerCameraDrawThreadPerContext' selected."<<std::endl;
OSG_NOTICE<<"Threading model 'CullThreadPerCameraDrawThreadPerContext' selected."<<std::endl;
break;
case(osgViewer::ViewerBase::CullThreadPerCameraDrawThreadPerContext):
viewerBase->setThreadingModel(osgViewer::ViewerBase::SingleThreaded);
OSG_NOTIFY(osg::NOTICE)<<"Threading model 'SingleThreaded' selected."<<std::endl;
OSG_NOTICE<<"Threading model 'SingleThreaded' selected."<<std::endl;
break;
#if 1
case(osgViewer::ViewerBase::AutomaticSelection):
viewerBase->setThreadingModel(osgViewer::ViewerBase::SingleThreaded);
OSG_NOTIFY(osg::NOTICE)<<"Threading model 'SingleThreaded' selected."<<std::endl;
OSG_NOTICE<<"Threading model 'SingleThreaded' selected."<<std::endl;
#else
case(osgViewer::ViewerBase::AutomaticSelection):
viewerBase->setThreadingModel(viewer->suggestBestThreadingModel());
OSG_NOTIFY(osg::NOTICE)<<"Threading model 'AutomaticSelection' selected."<<std::endl;
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);
OSG_NOTIFY(osg::NOTICE)<<"Threading model 'AfterSwapBuffers' selected."<<std::endl;
OSG_NOTICE<<"Threading model 'AfterSwapBuffers' selected."<<std::endl;
break;
case(osgViewer::Viewer::AfterSwapBuffers):
viewer->setEndBarrierPosition(osgViewer::Viewer::BeforeSwapBuffers);
OSG_NOTIFY(osg::NOTICE)<<"Threading model 'BeforeSwapBuffers' selected."<<std::endl;
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);
OSG_NOTIFY(osg::NOTICE) << "Recording camera path to file " << ss.str() << std::endl;
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
{
OSG_NOTIFY(osg::NOTICE)<<"Recording camera path."<<std::endl;
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());
OSG_NOTIFY(osg::NOTICE)<<"Writing camera file: "<<_filename<<std::endl;
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);
OSG_NOTIFY(osg::NOTICE)<<"LODScale = "<<camera->getLODScale()<<std::endl;
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);
OSG_NOTIFY(osg::NOTICE)<<"LODScale = "<<camera->getLODScale()<<std::endl;
OSG_NOTICE<<"LODScale = "<<camera->getLODScale()<<std::endl;
aa.requestRedraw();
return true;