diff options
author | Don Bright <hugh.m.bright@gmail.com> | 2011-10-19 22:34:11 (GMT) |
---|---|---|
committer | Don Bright <hugh.m.bright@gmail.com> | 2011-10-19 22:34:11 (GMT) |
commit | 0356c77a2fece07b1376e2bd12cfba5e44d16091 (patch) | |
tree | d25ca5d24b83d8a45c51cc6fe5806e18cf52a8d3 /tests/system-gl.cc | |
parent | 4799b7b555b3ddf86f9949caf9aae0e706cea4bc (diff) | |
parent | adf7cd51fbd02309a33604223004efe6a3da9380 (diff) |
Merge branch 'visitortests' of github.com:donbright/openscad into visitortests
Conflicts:
tests/system-gl.cc
Diffstat (limited to 'tests/system-gl.cc')
-rw-r--r-- | tests/system-gl.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/system-gl.cc b/tests/system-gl.cc index 750237d..00108cd 100644 --- a/tests/system-gl.cc +++ b/tests/system-gl.cc @@ -14,16 +14,16 @@ void glew_dump() { << "Vendor: " << (const char *)glGetString(GL_VENDOR) << endl << "OpenGL version: " << (const char *)glGetString(GL_VERSION) << endl; - string extensions((const char *)glGetString(GL_EXTENSIONS)); - replace_all( extensions, " ", "\n " ); - cerr << "Extensions: " << endl << " " << extensions << endl - << "Framebuffer and Stencil support:" << endl - << " GLEW_ARB_framebuffer_object: " << (bool)GLEW_ARB_framebuffer_object << endl - << " GLEW_EXT_framebuffer_object: " << (bool)GLEW_EXT_framebuffer_object << endl - << " GLEW_EXT_packed_depth_stencil: " << (bool)GLEW_EXT_packed_depth_stencil << endl - << " glewIsSupported(\"GL_ARB_framebuffer_object\"): " << (bool)glewIsSupported("GL_ARB_framebuffer_object") << endl - << " glewIsSupported(\"GL_EXT_framebuffer_object\"): " << (bool)glewIsSupported("GL_EXT_framebuffer_object") << endl - << " glewIsSupported(\"GL_EXT_packed_depth_stencil\"): " << (bool)glewIsSupported("GL_EXT_packed_depth_stencil") << endl; + bool dumpall = false; + if (dumpall) { + string extensions((const char *)glGetString(GL_EXTENSIONS)); + replace_all( extensions, " ", "\n " ); + cerr << "Extensions: " << endl << " " << extensions << endl; + } + + cerr << " GLEW_ARB_framebuffer_object: " << ((GLEW_ARB_framebuffer_object==1) ? "yes" : "no" ) << endl + << " GLEW_EXT_framebuffer_object: " << ((GLEW_EXT_framebuffer_object==1) ? "yes" : "no") << endl + << " GLEW_EXT_packed_depth_stencil: " << ((GLEW_EXT_packed_depth_stencil==1) ? "yes" : "no") << endl; }; const char * gl_errors[] = { @@ -33,7 +33,7 @@ const char * gl_errors[] = { "GL_OUT_OF_MEMORY" // 0x0503 }; -bool report_glerror(const char * task) +bool report_glerror(const char * function) { GLenum tGLErr = glGetError(); if (tGLErr != GL_NO_ERROR) { @@ -41,7 +41,7 @@ bool report_glerror(const char * task) cerr << "OpenGL error " << hex << tGLErr << "(" << << gl_errors[tGLErr-0x500] << ") while " << task << endl; else - cerr << "OpenGL error " << hex << tGLErr << " while " << task << endl; + cerr << "OpenGL error 0x" << hex << tGLErr << " after " << function << endl; return true; } return false; |