diff options
author | ftrapero <frantracer@gmail.com> | 2017-06-27 12:08:38 +0200 |
---|---|---|
committer | ftrapero <frantracer@gmail.com> | 2017-06-27 12:08:38 +0200 |
commit | b30506dface604c78e445905ce263f166945d67b (patch) | |
tree | 1c23f91f36eb445850b654daa9c5e30bb47072e5 /nx-X11/extras/Mesa_6.4.2/progs/util/errcheck.c | |
parent | c032f0e341c981036e9b3245a0e0710ad61599d0 (diff) | |
parent | 663631725ee2d633d9ec5821cd48953ffd188d00 (diff) | |
download | nx-libs-b30506dface604c78e445905ce263f166945d67b.tar.gz nx-libs-b30506dface604c78e445905ce263f166945d67b.tar.bz2 nx-libs-b30506dface604c78e445905ce263f166945d67b.zip |
Include mesa-6.4.2 project
Diffstat (limited to 'nx-X11/extras/Mesa_6.4.2/progs/util/errcheck.c')
-rw-r--r-- | nx-X11/extras/Mesa_6.4.2/progs/util/errcheck.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/nx-X11/extras/Mesa_6.4.2/progs/util/errcheck.c b/nx-X11/extras/Mesa_6.4.2/progs/util/errcheck.c new file mode 100644 index 000000000..fe9c2973c --- /dev/null +++ b/nx-X11/extras/Mesa_6.4.2/progs/util/errcheck.c @@ -0,0 +1,27 @@ +/* errcheck.c */ + + +/* + * Call this function in your rendering loop to check for GL errors + * during development. Remove from release code. + * + * Written by Brian Paul and in the public domain. + */ + + +#include <GL/gl.h> +#include <GL/glu.h> +#incldue <stdio.h> + + + +GLboolean CheckError( const char *message ) +{ + GLenum error = glGetError(); + if (error) { + char *err = (char *) gluErrorString( error ); + fprintf( stderr, "GL Error: %s at %s\n", err, message ); + return GL_TRUE; + } + return GL_FALSE; +} |