summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDon Bright <hugh.m.bright@gmail.com>2011-10-19 22:30:19 (GMT)
committerDon Bright <hugh.m.bright@gmail.com>2011-10-19 22:30:19 (GMT)
commit4799b7b555b3ddf86f9949caf9aae0e706cea4bc (patch)
tree1c3ed000c374cedc21a24d1ea7a8edf0d46a4ef4
parent2325f621d81cee0e1514e3d30868ec1e2a2a3667 (diff)
always dump hex code of GL error
-rw-r--r--tests/system-gl.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/system-gl.cc b/tests/system-gl.cc
index b7c7dd6..750237d 100644
--- a/tests/system-gl.cc
+++ b/tests/system-gl.cc
@@ -27,7 +27,7 @@ void glew_dump() {
};
const char * gl_errors[] = {
- "​GL_INVALID_ENUM​", // 0x0500
+ "GL_INVALID_ENUM", // 0x0500
"GL_INVALID_VALUE", // 0x0501
"GL_INVALID_OPERATION", // 0x0502
"GL_OUT_OF_MEMORY" // 0x0503
@@ -38,7 +38,8 @@ bool report_glerror(const char * task)
GLenum tGLErr = glGetError();
if (tGLErr != GL_NO_ERROR) {
if ( (tGLErr-0x500)<=3 && (tGLErr-0x500)>=0 )
- cerr << "OpenGL error " << gl_errors[tGLErr-0x500] << " while " << task << endl;
+ cerr << "OpenGL error " << hex << tGLErr << "(" <<
+ << gl_errors[tGLErr-0x500] << ") while " << task << endl;
else
cerr << "OpenGL error " << hex << tGLErr << " while " << task << endl;
return true;
contact: Jan Huwald // Impressum