From fde95d5ccfcac0bbffb1e523acb2fc3d66465e2b Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 6 Feb 2009 10:35:18 +0000 Subject: [PATCH] From Alberto Luaces, "here are some minor fixes to notify warnings were the std::hex modifier was used but never restored to the decimal notation. That made OSG print messages like the following after some notifications: Warning: detected OpenGL error 'invalid value' after RenderBin::draw(,) RenderStage::drawInner(,) FBO status= 0x8cd5 [...] Scaling image 'brick_side.JPG' from (1b4,24f) to (200,200) <--- Values in hex because of previous error. [...]" --- src/osg/Image.cpp | 4 ++-- src/osg/State.cpp | 4 ++-- src/osgPlugins/dicom/ReaderWriterDICOM.cpp | 2 +- src/osgPlugins/osgVolume/ImageLayer.cpp | 2 +- src/osgUtil/RenderStage.cpp | 8 ++++---- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/osg/Image.cpp b/src/osg/Image.cpp index 3d67e55f2..e308ea621 100644 --- a/src/osg/Image.cpp +++ b/src/osg/Image.cpp @@ -276,7 +276,7 @@ GLenum Image::computeFormatDataType(GLenum pixelFormat) default: { - notify(WARN)<<"error computeFormatType = "<className()<<" "<className()<<" "<className()<<" "<preMult(osg::Matrix::scale(double(image->s()), double(image->t()), double(image->r()))); - notice()<<"Image dimensions = "<s()<<", "<t()<<", "<r()<<" pixelFormat=0x"<t()<<", "<r()<<" pixelFormat=0x"<getPlanes()>numPlanes || pixelData->getRepresentation()>pixelRep) diff --git a/src/osgPlugins/osgVolume/ImageLayer.cpp b/src/osgPlugins/osgVolume/ImageLayer.cpp index 93b8ea4d1..d2f2a4a18 100644 --- a/src/osgPlugins/osgVolume/ImageLayer.cpp +++ b/src/osgPlugins/osgVolume/ImageLayer.cpp @@ -71,7 +71,7 @@ bool ImageLayer_readLocalData(osg::Object& obj, osgDB::Input &fr) image = osgDB::readRefImageFile( filename ); } - osg::notify(osg::INFO)<<"osgVolume::ImageLyaer image read: "<getPixelFormat()<<" textureFormat "<getInternalTextureFormat()<<" dataType "<getDataType()<getPixelFormat()<<" textureFormat "<getInternalTextureFormat()<<" dataType "<getDataType()<glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); @@ -472,7 +472,7 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo) { notify(NOTICE) << "RenderStage::runCameraSetUp(), " "multisample FBO setup failed, FBO status = 0x" - << std::hex << status << std::endl; + << std::hex << status << std::dec << std::endl; fbo->apply(state); fbo_multisample = 0; @@ -852,9 +852,9 @@ void RenderStage::drawInner(osg::RenderInfo& renderInfo,RenderLeaf*& previous, b { const char* error = (char*)gluErrorString(errorNo); if (error) osg::notify(osg::NOTICE)<<"Warning: detected OpenGL error '"<glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT)<glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT)<