Adding an error message code to the "smooth_opengl3" demo per e-mail from Diederick...
authorJohn F. Fay <johnffay@nettally.com>
Tue, 13 Dec 2011 03:48:26 +0000 (03:48 +0000)
committerJohn F. Fay <johnffay@nettally.com>
Tue, 13 Dec 2011 03:48:26 +0000 (03:48 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@949 7f0cb862-5218-0410-a997-914c9d46530a

progs/demos/smooth_opengl3/smooth_opengl3.c

index 8784759..e30e9f4 100755 (executable)
@@ -52,8 +52,9 @@
 void checkError(const char *functionName)
 {
    GLenum error;
-   while (( error = glGetError() ) != GL_NO_ERROR) {
-      fprintf (stderr, "GL error 0x%X detected in %s\n", error, functionName);
+   while (( error = glGetError() ) != GL_NO_ERROR) {\r
+      const GLubyte* sError = gluErrorString(error);
+      fprintf (stderr, "GL error 0x%X, %s, detected in %s\n", error, sError, functionName);
    }
 }