-namespace {
-
-void gl_error(std::string msg) {
- const GLubyte *errBegin = gluErrorString(glGetError());
- if (errBegin && *errBegin != '\0') {
- const GLubyte *errEnd = errBegin;
- while (*errEnd != '\0') {
- ++errEnd;
- }
- msg += ": ";
- msg.append(errBegin, errEnd);
- }
- throw std::runtime_error(msg);
-}
-
-}
-