Changed NOTIFY to OSG_NOTIFY

This commit is contained in:
Robert Osfield
2010-02-10 15:18:20 +00:00
parent c5d0ff600b
commit 4e44073e6b

View File

@@ -258,14 +258,14 @@ void TemporaryWindow::create()
_instance,
0)))
{
NOTIFY(osg::WARN) << "PixelBufferWin32, could not create temporary window: " << sysError() << std::endl;
OSG_NOTIFY(osg::WARN) << "PixelBufferWin32, could not create temporary window: " << sysError() << std::endl;
kill();
return;
}
if (!(_dc = GetDC(_handle)))
{
NOTIFY(osg::WARN) << "PixelBufferWin32, could not get device context for temporary window: " << sysError() << std::endl;
OSG_NOTIFY(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))
{
NOTIFY(osg::WARN) << "PixelBufferWin32, could not set pixel format for temporary window: " << sysError() << std::endl;
OSG_NOTIFY(osg::WARN) << "PixelBufferWin32, could not set pixel format for temporary window: " << sysError() << std::endl;
kill();
return;
}
if (!(_context = wglCreateContext(_dc)))
{
NOTIFY(osg::WARN) << "PixelBufferWin32, could not get graphics context for temporary window: " << sysError() << std::endl;
OSG_NOTIFY(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)
{
NOTIFY(osg::NOTICE) << "PixelBufferWin32, could not make the temporary window's context active: " << sysError() << std::endl;
OSG_NOTIFY(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())
{
NOTIFY(osg::NOTICE) << "PixelBufferWin32::init(), Error: some wgl extensions not supported" << std::endl;
OSG_NOTIFY(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)
{
NOTIFY(osg::NOTICE) << "PixelBufferWin32::init(), Error: Couldn't find a suitable pixel format" << std::endl;
OSG_NOTIFY(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)
{
NOTIFY(osg::NOTICE) << "PixelBufferWin32::init, wglCreatePbufferARB error: " << sysError() << std::endl;
OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32::init, wglCreatePbufferARB error: " << sysError() << std::endl;
return ;
}
_hdc = wgle->wglGetPbufferDCARB(reinterpret_cast<HPBUFFERARB>(_hwnd));
if (!_hdc)
{
NOTIFY(osg::NOTICE) << "PixelBufferWin32::init, wglGetPbufferDCARB error: " << sysError() << std::endl;
OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32::init, wglGetPbufferDCARB error: " << sysError() << std::endl;
return;
}
_hglrc = wglCreateContext(_hdc);
if (!_hglrc)
{
NOTIFY(osg::NOTICE) << "PixelBufferWin32::init, wglCreateContext error: " << sysError() << std::endl;
OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32::init, wglCreateContext error: " << sysError() << std::endl;
return;
}
@@ -629,9 +629,9 @@ void PixelBufferWin32::init()
if (_traits->width != iWidth || _traits->height != iHeight)
{
NOTIFY(osg::NOTICE) << "PixelBufferWin32::init(), pbuffer created with different size then requsted" << std::endl;
NOTIFY(osg::NOTICE) << "\tRequested size (" << _traits->width << "," << _traits->height << ")" << std::endl;
NOTIFY(osg::NOTICE) << "\tPbuffer size (" << iWidth << "," << iHeight << ")" << std::endl;
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;
_traits->width = iWidth;
_traits->height = iHeight;
}
@@ -646,7 +646,7 @@ bool PixelBufferWin32::realizeImplementation()
{
if (_realized)
{
NOTIFY(osg::NOTICE)<<"PixelBufferWin32::realizeImplementation() Already realized"<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"PixelBufferWin32::realizeImplementation() Already realized"<<std::endl;
return true;
}
@@ -663,7 +663,7 @@ bool PixelBufferWin32::realizeImplementation()
{
if ( !wglShareLists(graphicsHandleWin32->getWGLContext(), _hglrc) )
{
NOTIFY(osg::NOTICE) << "PixelBufferWin32::realizeImplementation, wglShareLists error: " << sysError() << std::endl;
OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32::realizeImplementation, wglShareLists error: " << sysError() << std::endl;
}
}
}
@@ -682,7 +682,7 @@ void PixelBufferWin32::closeImplementation()
if ( !wglDeleteContext(_hglrc) )
{
NOTIFY(osg::NOTICE) << "PixelBufferWin32::closeImplementation, wglDeleteContext error: " << sysError() << std::endl;
OSG_NOTIFY(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) )
{
NOTIFY(osg::NOTICE) << "PixelBufferWin32::closeImplementation, wglReleasePbufferDCARB error: " << sysError() << std::endl;
OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32::closeImplementation, wglReleasePbufferDCARB error: " << sysError() << std::endl;
}
if ( !wgle->wglDestroyPbufferARB(reinterpret_cast<HPBUFFERARB>(_hwnd)) )
{
NOTIFY(osg::NOTICE) << "PixelBufferWin32::closeImplementation, wglDestroyPbufferARB error: " << sysError() << std::endl;
OSG_NOTIFY(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)
{
NOTIFY(osg::NOTICE) << "PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: " << sysError() << std::endl;
OSG_NOTIFY(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) )
{
NOTIFY(osg::NOTICE) << "PixelBufferWin32::makeCurrentImplementation, wglReleaseTexImageARB error: " << sysError() << std::endl;
OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32::makeCurrentImplementation, wglReleaseTexImageARB error: " << sysError() << std::endl;
}
_boundBuffer=0;
}
@@ -740,7 +740,7 @@ bool PixelBufferWin32::makeContextCurrentImplementation( GraphicsContext* readCo
if ( !wgle || !wgle->wglMakeContextCurrentARB )
{
NOTIFY(osg::NOTICE) << "PixelBufferWin32, wglMakeContextCurrentARB not available" << std::endl;
OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32, wglMakeContextCurrentARB not available" << std::endl;
return false;
}
@@ -756,7 +756,7 @@ bool PixelBufferWin32::releaseContextImplementation()
{
if (!_realized)
{
NOTIFY(osg::NOTICE)<<"Warning: GraphicsWindow not realized, cannot do makeCurrent."<<std::endl;
OSG_NOTIFY(osg::NOTICE)<<"Warning: GraphicsWindow not realized, cannot do makeCurrent."<<std::endl;
return false;
}
@@ -769,7 +769,7 @@ void PixelBufferWin32::bindPBufferToTextureImplementation( GLenum buffer )
if ( !wgle || !wgle->wglBindTexImageARB )
{
NOTIFY(osg::NOTICE) << "PixelBufferWin32, wglBindTexImageARB not available" << std::endl;
OSG_NOTIFY(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) )
{
NOTIFY(osg::NOTICE) << "PixelBufferWin32::bindPBufferToTextureImplementation, wglReleaseTexImageARB error: " << sysError() << std::endl;
OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32::bindPBufferToTextureImplementation, wglReleaseTexImageARB error: " << sysError() << std::endl;
}
if ( !wgle->wglBindTexImageARB(reinterpret_cast<HPBUFFERARB>(_hwnd), bindBuffer) )
{
NOTIFY(osg::NOTICE) << "PixelBufferWin32::bindPBufferToTextureImplementation, wglBindTexImageARB error: " << sysError() << std::endl;
OSG_NOTIFY(osg::NOTICE) << "PixelBufferWin32::bindPBufferToTextureImplementation, wglBindTexImageARB error: " << sysError() << std::endl;
}
_boundBuffer = bindBuffer;
}