summaryrefslogtreecommitdiff
path: root/vcl/source/opengl
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2015-11-13 18:47:11 +0200
committerTor Lillqvist <tml@collabora.com>2015-11-13 18:50:36 +0200
commit38357ee010e9f22bc00080e603880cf82c74da48 (patch)
treec4892d733dc9fa183910fbb275bb3a320c572d3e /vcl/source/opengl
parent126df1eee630d357443c52e08dd1712c5a1f3234 (diff)
OpenGL error codes are defined in hex, so show them as such
Change-Id: I1f7fd98b243c49bfd90060b297bb2391cb102bb3
Diffstat (limited to 'vcl/source/opengl')
-rw-r--r--vcl/source/opengl/OpenGLHelper.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index f16f217b7628..79833d7de8f1 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -695,11 +695,10 @@ void OpenGLHelper::checkGLError(const char* pFile, size_t nLine)
break;
}
const char* sError = OpenGLHelper::GLErrorString(glErr);
+ if (!sError)
+ sError = "no message available";
- if (sError)
- SAL_WARN("vcl.opengl", "GL Error #" << glErr << "(" << sError << ") in File " << pFile << " at line: " << nLine);
- else
- SAL_WARN("vcl.opengl", "GL Error #" << glErr << " (no message available) in File " << pFile << " at line: " << nLine);
+ SAL_WARN("vcl.opengl", "GL Error " << std::hex << std::setw(4) << std::setfill('0') << glErr << std::dec << std::setw(0) << std::setfill(' ') << " (" << sError << ") in file " << pFile << " at line " << nLine);
// tdf#93798 - apitrace appears to sometimes cause issues with an infinite loop here.
if (++nErrors >= 8)