diff options
author | donbright <hugh.m.bright@gmail.com> | 2013-03-05 23:47:14 (GMT) |
---|---|---|
committer | donbright <hugh.m.bright@gmail.com> | 2013-03-05 23:47:14 (GMT) |
commit | 42f21c3a0850083d245aa3ac346a53e876f0679e (patch) | |
tree | facf41750e0fe27cc4cdaf352c9c8e687011d103 /tests/system-gl.cc | |
parent | 422c668dcb538f181683ae51305bf8d3404f48d6 (diff) | |
parent | 4734172c3a16cc06b09e4d2131aa8e380bd0f226 (diff) |
Merge pull request #288 from openscad/issue11_2
Issue11 2
Diffstat (limited to 'tests/system-gl.cc')
-rw-r--r-- | tests/system-gl.cc | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/tests/system-gl.cc b/tests/system-gl.cc deleted file mode 100644 index 2e3f3bc..0000000 --- a/tests/system-gl.cc +++ /dev/null @@ -1,50 +0,0 @@ - -/* OpenGL helper functions */ - -#include <iostream> -#include <sstream> -#include <string> -#include "system-gl.h" -#include <boost/algorithm/string.hpp> - -using namespace std; -using namespace boost; - -string glew_dump(bool dumpall) -{ - stringstream out; - out << "GLEW version: " << glewGetString(GLEW_VERSION) << endl - << "GL Renderer: " << (const char *)glGetString(GL_RENDERER) << endl - << "GL Vendor: " << (const char *)glGetString(GL_VENDOR) << endl - << "OpenGL Version: " << (const char *)glGetString(GL_VERSION) << endl; - - out << "GL Extensions: " << endl; - if (dumpall) { - string extensions((const char *)glGetString(GL_EXTENSIONS)); - replace_all( extensions, " ", "\n " ); - out << " " << extensions << endl; - } - - out << "GL_ARB_framebuffer_object: " - << (glewIsSupported("GL_ARB_framebuffer_object") ? "yes" : "no") - << endl - << "GL_EXT_framebuffer_object: " - << (glewIsSupported("GL_EXT_framebuffer_object") ? "yes" : "no") - << endl - << "GL_EXT_packed_depth_stencil: " - << (glewIsSupported("GL_EXT_packed_depth_stencil") ? "yes" : "no") - << endl; - - return out.str(); -}; - -bool report_glerror(const char * function) -{ - GLenum tGLErr = glGetError(); - if (tGLErr != GL_NO_ERROR) { - cerr << "OpenGL error 0x" << hex << tGLErr << ": " << gluErrorString(tGLErr) << " after " << function << endl; - return true; - } - return false; -} - |