From 7225768c0ba04fda25fec694a60775d7da32fe75 Mon Sep 17 00:00:00 2001 From: fayjf 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: https://svn.code.sf.net/p/freeglut/code/trunk@949 7f0cb862-5218-0410-a997-914c9d46530a --- .../freeglut/progs/demos/smooth_opengl3/smooth_opengl3.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/freeglut/freeglut/progs/demos/smooth_opengl3/smooth_opengl3.c b/freeglut/freeglut/progs/demos/smooth_opengl3/smooth_opengl3.c index 8784759..e30e9f4 100755 --- a/freeglut/freeglut/progs/demos/smooth_opengl3/smooth_opengl3.c +++ b/freeglut/freeglut/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); } }