From 4c67dfd83286859a203289d72182a46581a16db3 Mon Sep 17 00:00:00 2001 From: "John F. Fay" Date: Tue, 13 Dec 2011 03:48:26 +0000 Subject: [PATCH] Adding an error message code to the "smooth_opengl3" demo per e-mail from Diederick Niehorster dated 12/9/2011 as 12:22 AM 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/progs/demos/smooth_opengl3/smooth_opengl3.c b/progs/demos/smooth_opengl3/smooth_opengl3.c index 8784759..e30e9f4 100755 --- a/progs/demos/smooth_opengl3/smooth_opengl3.c +++ b/progs/demos/smooth_opengl3/smooth_opengl3.c @@ -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) { + const GLubyte* sError = gluErrorString(error); + fprintf (stderr, "GL error 0x%X, %s, detected in %s\n", error, sError, functionName); } } -- 1.7.10.4