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. [...]"
This commit is contained in:
@@ -965,7 +965,7 @@ bool State::checkGLErrors(const char* str) const
|
||||
{
|
||||
const char* error = (char*)gluErrorString(errorNo);
|
||||
if (error) osg::notify(WARN)<<"Warning: detected OpenGL error '" << error<<"'";
|
||||
else osg::notify(WARN)<<"Warning: detected OpenGL error number 0x" << std::hex << errorNo;
|
||||
else osg::notify(WARN)<<"Warning: detected OpenGL error number 0x" << std::hex << errorNo << std::dec;
|
||||
|
||||
if (str) osg::notify(WARN)<<" at "<<str<< std::endl;
|
||||
else osg::notify(WARN)<<" in osg::State."<< std::endl;
|
||||
@@ -996,7 +996,7 @@ bool State::checkGLErrors(const StateAttribute* attribute) const
|
||||
{
|
||||
const char* error = (char*)gluErrorString(errorNo);
|
||||
if (error) osg::notify(WARN)<<"Warning: detected OpenGL error '"<< error <<"' after applying attribute "<<attribute->className()<<" "<<attribute<< std::endl;
|
||||
else osg::notify(WARN)<<"Warning: detected OpenGL error number 0x"<< std::hex << errorNo <<" after applying attribute "<<attribute->className()<<" "<<attribute<< std::endl;
|
||||
else osg::notify(WARN)<<"Warning: detected OpenGL error number 0x"<< std::hex << errorNo <<" after applying attribute "<<attribute->className()<<" "<<attribute<< std::dec << std::endl;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user